From be29ce8cbb1f039ac450502a2730c48c2f747379 Mon Sep 17 00:00:00 2001 From: Jatin Chaudhary Date: Sun, 6 Dec 2020 07:41:35 -0800 Subject: [PATCH] Updating the gcnArchName to now have target id Change-Id: Ibd5576e0fb5b46e8f212de4ec57cd96eb1d3c157 [ROCm/hip commit: d056171a20150fcf090163b5e5b2d1c04e7acaa0] --- projects/hip/include/hip/hip_runtime_api.h | 2 +- projects/hip/rocclr/hip_device.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/hip/include/hip/hip_runtime_api.h b/projects/hip/include/hip/hip_runtime_api.h index 35e3111bc3..ed9a288282 100644 --- a/projects/hip/include/hip/hip_runtime_api.h +++ b/projects/hip/include/hip/hip_runtime_api.h @@ -114,7 +114,7 @@ typedef struct hipDeviceProp_t { size_t maxSharedMemoryPerMultiProcessor; ///< Maximum Shared Memory Per Multiprocessor. int isMultiGpuBoard; ///< 1 if device is on a multi-GPU board, 0 if not. int canMapHostMemory; ///< Check whether HIP can map host memory - int gcnArch; ///< AMD GCN Arch Value. Eg: 803, 701 + int gcnArch; ///< DEPRECATED: use gcnArchName instead char gcnArchName[256]; ///< AMD GCN Arch Name. int integrated; ///< APU vs dGPU int cooperativeLaunch; ///< HIP device supports cooperative launch diff --git a/projects/hip/rocclr/hip_device.cpp b/projects/hip/rocclr/hip_device.cpp index 2c1caa70f9..a223f2d6df 100644 --- a/projects/hip/rocclr/hip_device.cpp +++ b/projects/hip/rocclr/hip_device.cpp @@ -197,10 +197,10 @@ hipError_t hipGetDeviceProperties ( hipDeviceProp_t* props, hipDevice_t device ) deviceProps.pciBusID = info.deviceTopology_.pcie.bus; deviceProps.pciDeviceID = info.deviceTopology_.pcie.device; deviceProps.maxSharedMemoryPerMultiProcessor = info.localMemSizePerCU_; - //deviceProps.isMultiGpuBoard = info.; deviceProps.canMapHostMemory = 1; + //FIXME: This should be removed, targets can have character names as well. deviceProps.gcnArch = info.gfxipMajor_ * 100 + info.gfxipMinor_ * 10 + info.gfxipStepping_; - sprintf(deviceProps.gcnArchName, "gfx%d%d%x", info.gfxipMajor_, info.gfxipMinor_, info.gfxipStepping_); + sprintf(deviceProps.gcnArchName, "%s", info.name_); deviceProps.cooperativeLaunch = info.cooperativeGroups_; deviceProps.cooperativeMultiDeviceLaunch = info.cooperativeMultiDeviceGroups_;