P4 to Git Change 1500415 by gandryey@gera-w8 on 2018/01/05 11:17:48

SWDEV-136522 - Tools need a way to query the PCIE device id via the OpenCL API.
	- Add CL_DEVICE_PCIE_ID query

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_device.cpp#69 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl1.2/CL/cl_ext.h#20 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_ext.h#36 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.1/CL/cl_ext.h#13 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.2/CL/cl_ext.h#7 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#580 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#181 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/backend.h#15 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#69 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#79 edit
This commit is contained in:
foreman
2018-01-05 11:23:11 -05:00
parent 35e21240d7
commit 1317a4c2f9
5 changed files with 32 additions and 16 deletions
+13 -6
View File
@@ -519,12 +519,6 @@ void NullDevice::fillDeviceInfo(const CALdeviceattribs& calAttr, const gslMemInf
info_.extensions_ = getExtensionString();
info_.deviceTopology_.pcie.type = CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD;
info_.deviceTopology_.pcie.bus = (calAttr.pciTopologyInformation & (0xFF << 8)) >> 8;
info_.deviceTopology_.pcie.device = (calAttr.pciTopologyInformation & (0x1F << 3)) >> 3;
info_.deviceTopology_.pcie.function = (calAttr.pciTopologyInformation & 0x07);
::strncpy(info_.boardName_, calAttr.boardName, sizeof(info_.boardName_));
::strncpy(info_.driverStore_, calAttr.driverStore, sizeof(info_.driverStore_));
// OpenCL1.2 device info fields
@@ -565,6 +559,13 @@ void NullDevice::fillDeviceInfo(const CALdeviceattribs& calAttr, const gslMemInf
}
if (settings().checkExtension(ClAmdDeviceAttributeQuery)) {
::strncpy(info_.boardName_, calAttr.boardName, sizeof(info_.boardName_));
info_.deviceTopology_.pcie.type = CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD;
info_.deviceTopology_.pcie.bus = (calAttr.pciTopologyInformation & (0xFF << 8)) >> 8;
info_.deviceTopology_.pcie.device = (calAttr.pciTopologyInformation & (0x1F << 3)) >> 3;
info_.deviceTopology_.pcie.function = (calAttr.pciTopologyInformation & 0x07);
info_.simdPerCU_ = hwInfo()->simdPerCU_;
info_.simdWidth_ = hwInfo()->simdWidth_;
info_.simdInstructionWidth_ = hwInfo()->simdInstructionWidth_;
@@ -575,10 +576,16 @@ void NullDevice::fillDeviceInfo(const CALdeviceattribs& calAttr, const gslMemInf
info_.localMemSizePerCU_ = hwInfo()->localMemSizePerCU_;
info_.localMemBanks_ = hwInfo()->localMemBanks_;
info_.gfxipVersion_ = hwInfo()->gfxipVersion_;
info_.numAsyncQueues_ = numComputeRings;
info_.numRTQueues_ = numComputeRingsRT;
info_.numRTCUs_ = calAttr.maxRTCUs;
info_.threadTraceEnable_ = settings().threadTraceEnable_;
info_.pcieDeviceId_ = calAttr.pcieDeviceID;
info_.pcieRevisionId_ = calAttr.pcieRevisionID;
}
}