From b46ffd5fe0143611ddfd053ea55da5999d2384c1 Mon Sep 17 00:00:00 2001 From: Satyanvesh Dittakavi Date: Fri, 13 Aug 2021 11:59:51 -0700 Subject: [PATCH] SWDEV-274145 - Fix to return correct data when queried for hipMemRangeAttributeReadMostly attribute Change-Id: I9041c974b61e7a9c8fbdc748a407bbd04c060876 --- rocclr/device/rocm/rocdevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocclr/device/rocm/rocdevice.cpp b/rocclr/device/rocm/rocdevice.cpp index 907f23361f..e54736ccd9 100644 --- a/rocclr/device/rocm/rocdevice.cpp +++ b/rocclr/device/rocm/rocdevice.cpp @@ -2364,7 +2364,7 @@ bool Device::GetSvmAttributes(void** data, size_t* data_sizes, int* attributes, for (size_t i = 0; i < num_attributes; ++i) { switch (attributes[i]) { case amd::MemRangeAttribute::ReadMostly: - attr.push_back({HSA_AMD_SVM_ATTRIB_READ_ONLY, 0}); + attr.push_back({HSA_AMD_SVM_ATTRIB_READ_MOSTLY, 0}); break; case amd::MemRangeAttribute::PreferredLocation: attr.push_back({HSA_AMD_SVM_ATTRIB_PREFERRED_LOCATION, 0});