P4 to Git Change 1493313 by wchau@wchau_OCL_boltzmann on 2017/12/12 13:03:51

SWDEV-140733 - OpenCL Runtime Support for Raven BU in ROCm
	- add device info entry for Raven
	- modified Makefile.library to use Raven's bitcode library

Affected files ...

... //depot/stg/opencl/drivers/opencl/library/build/Makefile.library#61 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdefs.hpp#13 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#78 edit


[ROCm/clr commit: e0e70c043b]
This commit is contained in:
foreman
2017-12-12 13:14:35 -05:00
parent 833e78f5d9
commit 3993dd799f
2 changed files with 10 additions and 2 deletions
@@ -36,6 +36,7 @@ const HsaDeviceId HSA_ELLESMERE_ID = 7;
const HsaDeviceId HSA_BAFFIN_ID = 8;
const HsaDeviceId HSA_VEGA10_ID = 9;
const HsaDeviceId HSA_VEGA10_HBCC_ID = 10;
const HsaDeviceId HSA_RAVEN_ID = 11;
const HsaDeviceId HSA_INVALID_DEVICE_ID = -1;
static const AMDDeviceInfo DeviceInfo[] = {
@@ -56,7 +57,8 @@ static const AMDDeviceInfo DeviceInfo[] = {
/* TARGET BAFFIN */ {HSA_BAFFIN_ID, "", "polaris11", "Baffin", 4, 16, 1, 256, 64 * Ki, 32, 0,
0},
/* TARGET VEGA10 */ {HSA_VEGA10_ID, "", "gfx900", "gfx900", 4, 16, 1, 256, 64 * Ki, 32, 0, 0},
/* TARGET VEGA10_HBCC */ {HSA_VEGA10_HBCC_ID, "", "gfx901", "gfx901", 4, 16, 1, 256, 64 * Ki, 32, 0, 0}};
/* TARGET VEGA10_HBCC */ {HSA_VEGA10_HBCC_ID, "", "gfx901", "gfx901", 4, 16, 1, 256, 64 * Ki, 32, 0, 0},
/* TARGET RAVEN */ {HSA_RAVEN_ID, "", "gfx902", "gfx902", 4, 16, 1, 256, 64 * Ki, 32, 0, 0}};
}
const uint kMaxAsyncQueues = 8; // set to match the number of pipes, which is 8
@@ -88,6 +88,8 @@ static HsaDeviceId getHsaDeviceId(hsa_agent_t device, uint32_t& pci_id) {
return HSA_VEGA10_ID;
case 901:
return HSA_VEGA10_HBCC_ID;
case 902:
return HSA_RAVEN_ID;
default:
return HSA_INVALID_DEVICE_ID;
}
@@ -810,7 +812,11 @@ bool Device::populateOCLDeviceConstants() {
&info_.maxClockFrequency_)) {
return false;
}
assert(info_.maxClockFrequency_ > 0);
//TODO: add the assert statement for Raven
if (deviceInfo_.gfxipVersion_ != 902) {
assert(info_.maxClockFrequency_ > 0);
}
if (HSA_STATUS_SUCCESS !=
hsa_amd_agent_iterate_memory_pools(cpu_agent_, Device::iterateCpuMemoryPoolCallback, this)) {