From 171ec8809aba35875ee0b4a2e29b700b0e323086 Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 11 Jan 2018 15:55:18 -0500
Subject: [PATCH] P4 to Git Change 1502710 by wchau@wchau_OCL_boltzmann on
2018/01/11 15:44:09
SWDEV-142432 - OpenCL Runtime Support for Vega12 BU in ROCm
- add device info entry for Vega12
- modified Makefile.library to use Vega12's bitcode library
Affected files ...
... //depot/stg/opencl/drivers/opencl/library/build/Makefile.library#62 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdefs.hpp#14 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#80 edit
[ROCm/clr commit: 5d9c7b3b479a72c3aabb08e9a3b5fd8be4c37832]
---
projects/clr/rocclr/runtime/device/rocm/rocdefs.hpp | 4 +++-
projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/projects/clr/rocclr/runtime/device/rocm/rocdefs.hpp b/projects/clr/rocclr/runtime/device/rocm/rocdefs.hpp
index 7ce92a9f57..6c06a35b82 100644
--- a/projects/clr/rocclr/runtime/device/rocm/rocdefs.hpp
+++ b/projects/clr/rocclr/runtime/device/rocm/rocdefs.hpp
@@ -37,6 +37,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_VEGA12_ID = 12;
const HsaDeviceId HSA_INVALID_DEVICE_ID = -1;
static const AMDDeviceInfo DeviceInfo[] = {
@@ -58,7 +59,8 @@ static const AMDDeviceInfo DeviceInfo[] = {
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 RAVEN */ {HSA_RAVEN_ID, "", "gfx902", "gfx902", 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},
+ /* TARGET VEGA12 */ {HSA_VEGA12_ID, "", "gfx904", "gfx904", 4, 16, 1, 256, 64 * Ki, 32, 0, 0}};
}
const uint kMaxAsyncQueues = 8; // set to match the number of pipes, which is 8
diff --git a/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp b/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp
index 25292b035c..c274f6156e 100644
--- a/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp
+++ b/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp
@@ -90,6 +90,8 @@ static HsaDeviceId getHsaDeviceId(hsa_agent_t device, uint32_t& pci_id) {
return HSA_VEGA10_HBCC_ID;
case 902:
return HSA_RAVEN_ID;
+ case 904:
+ return HSA_VEGA12_ID;
default:
return HSA_INVALID_DEVICE_ID;
}