From fec51e85b00b7cdb6da495f23207ce246e07ef2a Mon Sep 17 00:00:00 2001 From: Vlad Sytchenko Date: Sat, 9 May 2020 12:42:30 -0400 Subject: [PATCH] Correct HIP_FUNC_ATTRIBUTE_NUM_REGS query Change-Id: I526cc7871c690260df0fa8c1b3b4b15fbc5af219 --- rocclr/hip_module.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocclr/hip_module.cpp b/rocclr/hip_module.cpp index a26249eabb..7cda6864c6 100755 --- a/rocclr/hip_module.cpp +++ b/rocclr/hip_module.cpp @@ -326,7 +326,7 @@ hipError_t hipFuncGetAttribute(int* value, hipFunction_attribute attrib, hipFunc *value = static_cast(wrkGrpInfo->privateMemSize_); break; case HIP_FUNC_ATTRIBUTE_NUM_REGS: - *value = static_cast(wrkGrpInfo->availableGPRs_); + *value = static_cast(wrkGrpInfo->usedVGPRs_); break; case HIP_FUNC_ATTRIBUTE_PTX_VERSION: *value = 30; // Defaults to 3.0 as HCC