From af97ec86ad646be3d7f016a560c43393240722ca Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 12 Dec 2018 23:38:10 -0500
Subject: [PATCH] P4 to Git Change 1719658 by wchau@wchau_OCL_boltzmann on
2018/12/12 22:34:36
SWDEV-174198 - OpenCL Runtime Support for MI100 BU in ROCM
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdefs.hpp#21 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#103 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLDeviceQueries.cpp#50 edit
---
rocclr/runtime/device/rocm/rocdefs.hpp | 4 +++-
rocclr/runtime/device/rocm/rocdevice.cpp | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/rocclr/runtime/device/rocm/rocdefs.hpp b/rocclr/runtime/device/rocm/rocdefs.hpp
index 9d063e8bee..350d3da1e4 100644
--- a/rocclr/runtime/device/rocm/rocdefs.hpp
+++ b/rocclr/runtime/device/rocm/rocdefs.hpp
@@ -46,6 +46,7 @@ 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_MI100_ID = 16;
const HsaDeviceId HSA_INVALID_DEVICE_ID = -1;
static const AMDDeviceInfo DeviceInfo[] = {
@@ -71,7 +72,8 @@ static const AMDDeviceInfo DeviceInfo[] = {
/* TARGET VEGA12 */ {HSA_VEGA12_ID, "", "gfx904", "gfx904", "gfx904", 4, 16, 1, 256, 64 * Ki, 32, 0, 0, false},
/* TARGET VEGA20 */ {HSA_VEGA20_ID, "", "gfx906", "gfx906", "gfx906", 4, 16, 1, 256, 64 * Ki, 32, 0, 0, false},
/* TARGET ARIEL */ {HSA_ARIEL_ID, "", "gfx1000", "gfx1000", "gfx1000", 4, 16, 1, 256, 64 * Ki, 32, 0, 0, false},
- /* TARGET NAVI10 */ {HSA_NAVI10_ID, "", "gfx1010", "gfx1010", "gfx1010", 4, 16, 1, 256, 64 * Ki, 32, 0, 0, false}};
+ /* TARGET NAVI10 */ {HSA_NAVI10_ID, "", "gfx1010", "gfx1010", "gfx1010", 4, 16, 1, 256, 64 * Ki, 32, 0, 0, false},
+ /* TARGET MI100 */ {HSA_MI100_ID, "", "gfx908", "gfx908", "gfx908", 4, 16, 1, 256, 64 * Ki, 32, 0, 0, false}};
}
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 4a385a9400..10c43a2bfb 100644
--- a/rocclr/runtime/device/rocm/rocdevice.cpp
+++ b/rocclr/runtime/device/rocm/rocdevice.cpp
@@ -94,6 +94,8 @@ static HsaDeviceId getHsaDeviceId(hsa_agent_t device, uint32_t& pci_id) {
return HSA_VEGA12_ID;
case 906:
return HSA_VEGA20_ID;
+ case 908:
+ return HSA_MI100_ID;
case 1000:
return HSA_ARIEL_ID;
case 1010: