From 61d0b999be8eada16e4493ac8c28b189b6d75ce3 Mon Sep 17 00:00:00 2001 From: Saleel Kudchadker Date: Mon, 28 Mar 2022 22:21:22 -0700 Subject: [PATCH] SWDEV-301947 - Report regular CU count for OpenCL Change-Id: I3ea058bba98f3c6554cbde37173bbd772f489cf5 --- rocclr/device/rocm/rocdevice.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rocclr/device/rocm/rocdevice.cpp b/rocclr/device/rocm/rocdevice.cpp index faaa62d037..7fd144f8ec 100644 --- a/rocclr/device/rocm/rocdevice.cpp +++ b/rocclr/device/rocm/rocdevice.cpp @@ -1103,7 +1103,9 @@ bool Device::populateOCLDeviceConstants() { } if (HSA_STATUS_SUCCESS != hsa_agent_get_info(_bkendDevice, - (hsa_agent_info_t)HSA_AMD_AGENT_INFO_COOPERATIVE_COMPUTE_UNIT_COUNT, + (amd::IS_HIP) ? + (hsa_agent_info_t)HSA_AMD_AGENT_INFO_COOPERATIVE_COMPUTE_UNIT_COUNT : + (hsa_agent_info_t)HSA_AMD_AGENT_INFO_COMPUTE_UNIT_COUNT, &info_.maxComputeUnits_)) { return false; }