diff --git a/hipamd/src/hip_hmm.cpp b/hipamd/src/hip_hmm.cpp index 2aa364ee31..15b9105bff 100644 --- a/hipamd/src/hip_hmm.cpp +++ b/hipamd/src/hip_hmm.cpp @@ -72,6 +72,10 @@ hipError_t hipMallocManaged(void** dev_ptr, size_t size, unsigned int flags) { HIP_RETURN(hipErrorInvalidValue); } + if (!hip::tls.capture_streams_.empty() || !g_captureStreams.empty()) { + HIP_RETURN(hipErrorStreamCaptureUnsupported); + } + HIP_RETURN(ihipMallocManaged(dev_ptr, size), *dev_ptr); } @@ -151,6 +155,10 @@ hipError_t hipMemAdvise(const void* dev_ptr, size_t count, hipMemoryAdvise advic HIP_RETURN(hipErrorInvalidValue); } + if (!hip::tls.capture_streams_.empty() || !g_captureStreams.empty()) { + HIP_RETURN(hipErrorStreamCaptureUnsupported); + } + size_t offset = 0; amd::Memory* memObj = getMemoryObject(dev_ptr, offset); if (memObj && count > (memObj->getSize() - offset)) {