From 16c55e6a3698ba5e905f7d650017ca28f76509cf Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 25 Jul 2018 12:43:09 -0400
Subject: [PATCH] P4 to Git Change 1585268 by wchau@wchau_OCL_boltzmann on
2018/07/25 12:33:45
SWDEV-160377 - [OCL][ROCM] Add OpenCL Runtime Support for GFX10 in ROCm
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdefs.hpp#18 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#92 edit
---
rocclr/runtime/device/rocm/rocdefs.hpp | 6 +++++-
rocclr/runtime/device/rocm/rocdevice.cpp | 4 ++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/rocclr/runtime/device/rocm/rocdefs.hpp b/rocclr/runtime/device/rocm/rocdefs.hpp
index 94617bf4ea..893165c1f5 100644
--- a/rocclr/runtime/device/rocm/rocdefs.hpp
+++ b/rocclr/runtime/device/rocm/rocdefs.hpp
@@ -43,6 +43,8 @@ const HsaDeviceId HSA_VEGA10_HBCC_ID = 10;
const HsaDeviceId HSA_RAVEN_ID = 11;
const HsaDeviceId HSA_VEGA12_ID = 12;
const HsaDeviceId HSA_VEGA20_ID = 13;
+const HsaDeviceId HSA_ARIEL_ID = 14;
+const HsaDeviceId HSA_NAVI10_ID = 15;
const HsaDeviceId HSA_INVALID_DEVICE_ID = -1;
static const AMDDeviceInfo DeviceInfo[] = {
@@ -66,7 +68,9 @@ static const AMDDeviceInfo DeviceInfo[] = {
/* TARGET VEGA10_HBCC */ {HSA_VEGA10_HBCC_ID, "", "gfx901", "gfx901", 4, 16, 1, 256, 64 * Ki, 32, 0, 0, false},
/* TARGET RAVEN */ {HSA_RAVEN_ID, "", "gfx902", "gfx902", 4, 16, 1, 256, 64 * Ki, 32, 0, 0, true},
/* TARGET VEGA12 */ {HSA_VEGA12_ID, "", "gfx904", "gfx904", 4, 16, 1, 256, 64 * Ki, 32, 0, 0, false},
- /* TARGET VEGA20 */ {HSA_VEGA20_ID, "", "gfx906", "gfx906", 4, 16, 1, 256, 64 * Ki, 32, 0, 0, false}};
+ /* TARGET VEGA20 */ {HSA_VEGA20_ID, "", "gfx906", "gfx906", 4, 16, 1, 256, 64 * Ki, 32, 0, 0, false},
+ /* TARGET ARIEL */ {HSA_ARIEL_ID, "", "gfx1000", "gfx1000", 4, 16, 1, 256, 64 * Ki, 32, 0, 0, true},
+ /* TARGET NAVI10 */ {HSA_NAVI10_ID, "", "gfx1010", "gfx1010", 4, 16, 1, 256, 64 * Ki, 32, 0, 0, true}};
}
const uint kMaxAsyncQueues = 8; // set to match the number of pipes, which is 8
diff --git a/rocclr/runtime/device/rocm/rocdevice.cpp b/rocclr/runtime/device/rocm/rocdevice.cpp
index 63c1989269..175085d612 100644
--- a/rocclr/runtime/device/rocm/rocdevice.cpp
+++ b/rocclr/runtime/device/rocm/rocdevice.cpp
@@ -94,6 +94,10 @@ static HsaDeviceId getHsaDeviceId(hsa_agent_t device, uint32_t& pci_id) {
return HSA_VEGA12_ID;
case 906:
return HSA_VEGA20_ID;
+ case 1000:
+ return HSA_ARIEL_ID;
+ case 1010:
+ return HSA_NAVI10_ID;
default:
return HSA_INVALID_DEVICE_ID;
}