From 1a19de73d9b3e09a728bdfa1394680ae824953ed Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 30 Mar 2017 15:09:52 -0400 Subject: [PATCH] P4 to Git Change 1392795 by wchau@wchau_OCL_boltzmann on 2017/03/30 14:32:40 SWDEV-79278 - [OpenCL][GFXIP9 Bring up] Add the Vega10 DeviceInfo entry and the gfx90X control functions. - modify getHsaDeviceId() to use HSA_AGENT_INFO_NAME to determine the HSA device ID. - add back the codes to get the pci_id in the function Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#46 edit [ROCm/clr commit: 37f3408aefe74806151357453869d9af5c4551ce] --- projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp b/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp index c50e4793bc..27d7016f69 100644 --- a/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp +++ b/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp @@ -55,6 +55,14 @@ const bool roc::NullDevice::offlineDevice_= true; static HsaDeviceId getHsaDeviceId(hsa_agent_t device, uint32_t& pci_id) { + + if (HSA_STATUS_SUCCESS != + hsa_agent_get_info( + device, (hsa_agent_info_t)HSA_AMD_AGENT_INFO_CHIP_ID, + &pci_id)) { + return HSA_INVALID_DEVICE_ID; + } + char agent_name[64] = { 0 }; if (HSA_STATUS_SUCCESS != hsa_agent_get_info(device, HSA_AGENT_INFO_NAME, agent_name)) {