diff --git a/runtime/hsa-runtime/core/driver/xdna/amd_xdna_driver.cpp b/runtime/hsa-runtime/core/driver/xdna/amd_xdna_driver.cpp index f5d16f7729..60325b7f53 100644 --- a/runtime/hsa-runtime/core/driver/xdna/amd_xdna_driver.cpp +++ b/runtime/hsa-runtime/core/driver/xdna/amd_xdna_driver.cpp @@ -198,7 +198,7 @@ XdnaDriver::AllocateMemory(const core::MemoryRegion &mem_region, return HSA_STATUS_ERROR_INVALID_REGION; } - const bool use_bo_shmem = m_region.kernarg() || m_region.IsSystemButNotSVM(); + const bool use_bo_shmem = !m_region.IsDeviceSVM(); if (use_bo_shmem) { create_bo_args.type = AMDXDNA_BO_SHMEM; } else { diff --git a/runtime/hsa-runtime/core/inc/amd_memory_region.h b/runtime/hsa-runtime/core/inc/amd_memory_region.h index 53f69912da..79f6631550 100644 --- a/runtime/hsa-runtime/core/inc/amd_memory_region.h +++ b/runtime/hsa-runtime/core/inc/amd_memory_region.h @@ -147,8 +147,8 @@ class MemoryRegion : public core::MemoryRegion { (mem_props_.HeapType == HSA_HEAPTYPE_DEVICE_SVM)); } - __forceinline bool IsSystemButNotSVM() const { - return (mem_props_.HeapType == HSA_HEAPTYPE_SYSTEM); + __forceinline bool IsDeviceSVM() const { + return (mem_props_.HeapType == HSA_HEAPTYPE_DEVICE_SVM); } __forceinline bool IsLDS() const {