Skip to content

Commit c7f3ae6

Browse files
authored
SWDEV-504307 SWDEV-504308 - fix hipDeviceSetCacheConfig and hipDeviceSetSharedMemConfig when capturing stream (#411)
1 parent 93c6ffd commit c7f3ae6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

hipamd/src/hip_device_runtime.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,10 @@ hipError_t hipDeviceSetCacheConfig(hipFuncCache_t cacheConfig) {
591591
HIP_RETURN(hipErrorInvalidValue);
592592
}
593593

594+
if (!hip::tls.capture_streams_.empty() || !g_captureStreams.empty()) {
595+
HIP_RETURN(hipErrorStreamCaptureUnsupported);
596+
}
597+
594598
// No way to set cache config yet.
595599

596600
HIP_RETURN(hipSuccess);
@@ -631,6 +635,11 @@ hipError_t hipDeviceSetSharedMemConfig(hipSharedMemConfig config) {
631635
config != hipSharedMemBankSizeEightByte) {
632636
HIP_RETURN(hipErrorInvalidValue);
633637
}
638+
639+
if (!hip::tls.capture_streams_.empty() || !g_captureStreams.empty()) {
640+
HIP_RETURN(hipErrorStreamCaptureUnsupported);
641+
}
642+
634643
// No way to set cache config yet.
635644

636645
HIP_RETURN(hipSuccess);

0 commit comments

Comments
 (0)