diff --git a/rocclr/device/device.cpp b/rocclr/device/device.cpp index 22342d3afc..a1d151d2f9 100644 --- a/rocclr/device/device.cpp +++ b/rocclr/device/device.cpp @@ -1051,6 +1051,13 @@ bool Device::IpcCreate(void* dev_ptr, size_t* mem_size, char* handle, size_t* me return false; } + // VMM allocations must use hipMemExportToShareableHandle for IPC. + if (amd_mem_obj->getMemFlags() & CL_MEM_VA_RANGE_AMD) { + ClPrint(amd::LOG_DETAIL_DEBUG, amd::LOG_MEM, + "IPC is not supported for VMM allocations (dev_ptr: 0x%x)", dev_ptr); + return false; + } + // Get the original pointer from the amd::Memory object void* orig_dev_ptr = nullptr; if (amd_mem_obj->getSvmPtr() != nullptr) {