From d4cbb3a8017d79a599c27d197a4d2d553065fa71 Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 1 Dec 2016 21:55:50 -0500
Subject: [PATCH] P4 to Git Change 1348476 by lmoriche@lmoriche_opencl_dev on
2016/12/01 21:48:08
SWDEV-79278 - [OpenCL][GFXIP9 Bring up] Add the Vega10 DeviceInfo entry and the gfx90X control functions.
Affected files ...
... //depot/stg/opencl/drivers/opencl/library/build/Makefile.library#59 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdefs.hpp#8 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#29 edit
---
rocclr/runtime/device/rocm/rocdefs.hpp | 4 +++-
rocclr/runtime/device/rocm/rocdevice.cpp | 3 +++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/rocclr/runtime/device/rocm/rocdefs.hpp b/rocclr/runtime/device/rocm/rocdefs.hpp
index eb12a99c83..b08349f1e7 100644
--- a/rocclr/runtime/device/rocm/rocdefs.hpp
+++ b/rocclr/runtime/device/rocm/rocdefs.hpp
@@ -31,6 +31,7 @@ const HsaDeviceId HSA_FIJI_ID = 5;
const HsaDeviceId HSA_HAWAII_ID = 6;
const HsaDeviceId HSA_ELLESMERE_ID = 7;
const HsaDeviceId HSA_BAFFIN_ID = 8;
+const HsaDeviceId HSA_VEGA10_ID = 9;
const HsaDeviceId HSA_INVALID_DEVICE_ID = -1;
static const AMDDeviceInfo DeviceInfo[] = {
@@ -43,7 +44,8 @@ static const AMDDeviceInfo DeviceInfo[] = {
/* TARGET_FIJI */ {HSA_FIJI_ID, "", "fiji", "Fiji", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 },
/* TARGET HAWAII */ {HSA_HAWAII_ID, "", "hawaii", "Hawaii", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 },
/* TARGET ELLESMERE */ {HSA_ELLESMERE_ID, "", "polaris10", "Ellesmere", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 },
- /* TARGET BAFFIN */ {HSA_BAFFIN_ID, "", "polaris11", "Baffin", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 }
+ /* 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 }
};
}
diff --git a/rocclr/runtime/device/rocm/rocdevice.cpp b/rocclr/runtime/device/rocm/rocdevice.cpp
index 7d462eddfa..ca33e9cead 100644
--- a/rocclr/runtime/device/rocm/rocdevice.cpp
+++ b/rocclr/runtime/device/rocm/rocdevice.cpp
@@ -29,6 +29,7 @@
#include "vi_id.h"
#include "cz_id.h"
#include "ci_id.h"
+#include "ai_id.h"
#include
#include
#include
@@ -147,6 +148,8 @@ static HsaDeviceId getHsaDeviceId(hsa_agent_t device, uint32_t& pci_id) {
case DEVICE_ID_VI_BAFFIN_M_67E7:
case DEVICE_ID_VI_BAFFIN_M_67E9:
return HSA_BAFFIN_ID;
+ case DEVICE_ID_AI_GREENLAND_P_687F:
+ return HSA_VEGA10_ID;
default:
return HSA_INVALID_DEVICE_ID;
}