From f962ea4cc1d2ea8dbc3d8f4ba733218d8baf5bac Mon Sep 17 00:00:00 2001 From: Tao Sang Date: Thu, 18 Mar 2021 22:40:43 -0400 Subject: [PATCH] SWDEV-273138 - Update canUseStreamWaitValue retrieving Remove canUseStreamWaitValue from hipDeviceProp_t. Update canUseStreamWaitValue retrieving in hipDeviceGetAttribute(). Change-Id: I275bd42d8b03e141caaf9f1bc6b714e51ca72dfb [ROCm/hip commit: ca0cc36ef4061e62fb2de4f36ac902dff4fff6cf] --- projects/hip/include/hip/hip_runtime_api.h | 2 -- projects/hip/rocclr/hip_device.cpp | 3 --- projects/hip/rocclr/hip_device_runtime.cpp | 3 ++- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/projects/hip/include/hip/hip_runtime_api.h b/projects/hip/include/hip/hip_runtime_api.h index 3c67216d24..d8bb8c5b4e 100644 --- a/projects/hip/include/hip/hip_runtime_api.h +++ b/projects/hip/include/hip/hip_runtime_api.h @@ -147,8 +147,6 @@ typedef struct hipDeviceProp_t { int pageableMemoryAccess; ///< Device supports coherently accessing pageable memory ///< without calling hipHostRegister on it int pageableMemoryAccessUsesHostPageTables; ///< Device accesses pageable memory via the host's page tables - int canUseStreamWaitValue; ///< '1' if Device supports hipStreamWaitValue32() and - ///< hipStreamWaitValue64() , '0' otherwise. } hipDeviceProp_t; diff --git a/projects/hip/rocclr/hip_device.cpp b/projects/hip/rocclr/hip_device.cpp index 8725edcf24..3488bc21bd 100644 --- a/projects/hip/rocclr/hip_device.cpp +++ b/projects/hip/rocclr/hip_device.cpp @@ -235,9 +235,6 @@ hipError_t hipGetDeviceProperties ( hipDeviceProp_t* props, hipDevice_t device ) deviceProps.pageableMemoryAccess = info.hmmCpuMemoryAccessible_; deviceProps.pageableMemoryAccessUsesHostPageTables = info.hostUnifiedMemory_; - // hipStreamWaitValue64() and hipStreamWaitValue32() support - deviceProps.canUseStreamWaitValue = info.aqlBarrierValue_; - *props = deviceProps; HIP_RETURN(hipSuccess); } diff --git a/projects/hip/rocclr/hip_device_runtime.cpp b/projects/hip/rocclr/hip_device_runtime.cpp index ee82b04329..560821c033 100755 --- a/projects/hip/rocclr/hip_device_runtime.cpp +++ b/projects/hip/rocclr/hip_device_runtime.cpp @@ -315,7 +315,8 @@ hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int device) *pi = prop.pageableMemoryAccessUsesHostPageTables; break; case hipDeviceAttributeCanUseStreamWaitValue: - *pi = prop.canUseStreamWaitValue; + // hipStreamWaitValue64() and hipStreamWaitValue32() support + *pi = g_devices[device]->devices()[0]->info().aqlBarrierValue_; break; default: HIP_RETURN(hipErrorInvalidValue);