From da7c6f57ef22148dee277cbfda5111624c07b2c5 Mon Sep 17 00:00:00 2001 From: "Sang, Tao" Date: Thu, 26 Jun 2025 14:05:23 -0400 Subject: [PATCH] SWDEV-539399 - Support ROCCLR_MEM_HSA_CONTIGUOUS (#610) Fix missing support of ROCCLR_MEM_HSA_CONTIGUOUS in hipExtMallocWithFlags(). [ROCm/clr commit: f4d78d427c548c713a97fc7f23a0326c82861308] --- projects/clr/rocclr/device/rocm/rocdevice.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/projects/clr/rocclr/device/rocm/rocdevice.cpp b/projects/clr/rocclr/device/rocm/rocdevice.cpp index 1cc5851028..9b513bba30 100644 --- a/projects/clr/rocclr/device/rocm/rocdevice.cpp +++ b/projects/clr/rocclr/device/rocm/rocdevice.cpp @@ -2257,8 +2257,9 @@ void* Device::deviceLocalAlloc(size_t size, bool atomics, bool pseudo_fine_grain } void* ptr = nullptr; - hsa_status_t stat = hsa_amd_memory_pool_allocate(pool, size, 0, &ptr); - ClPrint(amd::LOG_DEBUG, amd::LOG_MEM, "Allocate hsa device memory %p, size 0x%zx", ptr, size); + hsa_status_t stat = hsa_amd_memory_pool_allocate(pool, size, hsa_mem_flags, &ptr); + ClPrint(amd::LOG_DEBUG, amd::LOG_MEM, + "Allocate hsa device memory %p, size 0x%zx, hsa_mem_flags 0x%xh", ptr, size, hsa_mem_flags); if (stat != HSA_STATUS_SUCCESS) { LogError("Fail allocation local memory"); return nullptr; @@ -3665,4 +3666,4 @@ device::UriLocator* Device::createUriLocator() const { #endif #endif } // namespace amd::roc -#endif // WITHOUT_HSA_BACKEND \ No newline at end of file +#endif // WITHOUT_HSA_BACKEND