Skip to content

Commit 224dc4c

Browse files
committed
Support GFX804 in OpenCL version of GPA
1 parent 41b907a commit 224dc4c

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Src/GPUPerfAPICL/GPUPerfAPICL.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ GPA_Status GPA_IMP_GetHWInfo(void* pContext, GPA_HWInfo* pHwInfo)
9898
message << "Device name from Queue: " << str << ".";
9999
GPA_LogDebugMessage(message.str().c_str());
100100

101+
// Note for some ASICs, there isn't a revision 0, so we default to zero
102+
// here, but then override the revision id to a valid non-zero value below
103+
pHwInfo->SetRevisionID(0);
104+
101105
// get the device ID
102106
// the string comes from maswp4p1.amd.com:1666 \\depot\stg\opencl\drivers\opencl\runtime\device\gpu\gpudefs.hpp as the static const char* TargetName[] array
103107
if (realDeviceName.compare("Tahiti") == 0)
@@ -135,6 +139,7 @@ GPA_Status GPA_IMP_GetHWInfo(void* pContext, GPA_HWInfo* pHwInfo)
135139
else if (realDeviceName.compare("Mullins") == 0)
136140
{
137141
pHwInfo->SetDeviceID(0x9855);
142+
pHwInfo->SetRevisionID(0x02);
138143
}
139144
else if (realDeviceName.compare("Spectre") == 0)
140145
{
@@ -167,18 +172,24 @@ GPA_Status GPA_IMP_GetHWInfo(void* pContext, GPA_HWInfo* pHwInfo)
167172
else if (realDeviceName.compare("Ellesmere") == 0)
168173
{
169174
pHwInfo->SetDeviceID(0x67DF);
175+
pHwInfo->SetRevisionID(0x04);
170176
}
171177
else if (realDeviceName.compare("Baffin") == 0)
172178
{
173179
pHwInfo->SetDeviceID(0x67FF);
180+
pHwInfo->SetRevisionID(0x08);
181+
}
182+
else if (realDeviceName.compare("gfx804") == 0)
183+
{
184+
pHwInfo->SetDeviceID(0x699F);
185+
pHwInfo->SetRevisionID(0x81);
174186
}
175187
else
176188
{
177189
GPA_LogError("Available device is not supported.");
178190
return GPA_STATUS_ERROR_HARDWARE_NOT_SUPPORTED;
179191
}
180192

181-
pHwInfo->SetRevisionID(0);
182193
pHwInfo->SetDeviceName(str);
183194

184195
cl_uint vendorID;
@@ -294,6 +305,7 @@ GPA_Status GPA_IMP_CompareHWInfo(void* pContext, GPA_HWInfo* pHwInfo)
294305
(strTranslatedDeviceName.compare("Stoney") == 0 && asic == GDT_STONEY) ||
295306
(strTranslatedDeviceName.compare("Ellesmere") == 0 && asic == GDT_ELLESMERE) ||
296307
(strTranslatedDeviceName.compare("Baffin") == 0 && asic == GDT_BAFFIN) ||
308+
(strTranslatedDeviceName.compare("gfx804") == 0 && asic == GDT_GFX8_0_4) ||
297309
(strTranslatedDeviceName.compare("AMD HSA Device") == 0 && (asic == GDT_SPOOKY || asic == GDT_SPECTRE || asic == GDT_SPECTRE_LITE || asic == GDT_SPECTRE_SL))
298310
)
299311
{

0 commit comments

Comments
 (0)