diff --git a/projects/clr/hipamd/src/hip_module.cpp b/projects/clr/hipamd/src/hip_module.cpp index 7213b315f0..9886685efd 100644 --- a/projects/clr/hipamd/src/hip_module.cpp +++ b/projects/clr/hipamd/src/hip_module.cpp @@ -48,6 +48,7 @@ hipError_t hipModuleUnload(hipModule_t hmod) { if (hmod == nullptr) { HIP_RETURN(hipErrorInvalidResourceHandle); } + CHECK_STREAM_CAPTURE_SUPPORTED(); HIP_RETURN(PlatformState::instance().unloadModule(hmod)); } diff --git a/projects/clr/hipamd/src/hip_stream.cpp b/projects/clr/hipamd/src/hip_stream.cpp index 6fbd15a86c..a2196cb83a 100644 --- a/projects/clr/hipamd/src/hip_stream.cpp +++ b/projects/clr/hipamd/src/hip_stream.cpp @@ -559,6 +559,8 @@ hipError_t hipStreamQuery_spt(hipStream_t stream) { hipError_t streamCallback_common(hipStream_t stream, StreamCallback* cbo, void* userData) { getStreamPerThread(stream); + + CHECK_SUPPORTED_DURING_CAPTURE(); hip::Stream* hip_stream = hip::getStream(stream); amd::Command* last_command = hip_stream->getLastQueuedCommand(true); amd::Command::EventWaitList eventWaitList;