From 04dc7ca51f9da83b66ea1663c9e606d9fb6572cd Mon Sep 17 00:00:00 2001 From: "Li, Todd tiantuo" Date: Thu, 6 Feb 2025 03:45:35 -0800 Subject: [PATCH] SWDEV-508980 - [6.4 Preview] fix hipDeviceSetCacheConfig during stream capture Change-Id: I8e89774a8163fdc120155f742606ee2c0aa7103b [ROCm/clr commit: 9faaf20aae5e97269d73ca42ed83f6cb91f75227] --- projects/clr/hipamd/src/hip_device_runtime.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/clr/hipamd/src/hip_device_runtime.cpp b/projects/clr/hipamd/src/hip_device_runtime.cpp index 1f07c1b4e9..9a1b30038f 100644 --- a/projects/clr/hipamd/src/hip_device_runtime.cpp +++ b/projects/clr/hipamd/src/hip_device_runtime.cpp @@ -578,6 +578,11 @@ hipError_t hipDeviceSetCacheConfig(hipFuncCache_t cacheConfig) { cacheConfig != hipFuncCachePreferL1 && cacheConfig != hipFuncCachePreferEqual) { HIP_RETURN(hipErrorInvalidValue); } + if (DEBUG_HIP_7_PREVIEW & amd::CHANGE_HIP_STREAM_CAPTURE_API) { + if (!hip::tls.capture_streams_.empty() || !g_captureStreams.empty()) { + HIP_RETURN(hipErrorStreamCaptureUnsupported); + } + } // No way to set cache config yet.