From 2cde04bf9b4c525c7f2ea8b9b4a4439bdfb8cc47 Mon Sep 17 00:00:00 2001 From: German Date: Mon, 14 Nov 2022 14:00:07 -0500 Subject: [PATCH] SWDEV-367745 - Report hipDeviceAttributeUnifiedAddressing Change-Id: I4d1d598f64f613430fecdc0d6b4cfa9845e04687 --- hipamd/src/hip_device_runtime.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hipamd/src/hip_device_runtime.cpp b/hipamd/src/hip_device_runtime.cpp index 25b05ea70d..0a3d9ada30 100644 --- a/hipamd/src/hip_device_runtime.cpp +++ b/hipamd/src/hip_device_runtime.cpp @@ -319,6 +319,12 @@ hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int device) case hipDeviceAttributePageableMemoryAccessUsesHostPageTables: *pi = prop.pageableMemoryAccessUsesHostPageTables; break; + case hipDeviceAttributeUnifiedAddressing: + // HIP runtime always uses SVM for host memory allocations. + // Note: Host registered memory isn't covered by this feature + // and still requires hipMemHostGetDevicePointer() call + *pi = true; + break; case hipDeviceAttributeCanUseStreamWaitValue: // hipStreamWaitValue64() and hipStreamWaitValue32() support *pi = g_devices[device]->devices()[0]->info().aqlBarrierValue_;