summaryrefslogtreecommitdiffstats
path: root/xmrstak/backend/amd/amd_gpu/gpu.cpp
diff options
context:
space:
mode:
authorExceptionallyGreat <33473980+ExceptionallyGreat@users.noreply.github.com>2017-11-21 12:06:20 -0800
committerGitHub <noreply@github.com>2017-11-21 12:06:20 -0800
commita7c5e97a123789cd894f2264a696ab23646212c2 (patch)
treef09ab81370191d59a8b344adb3bf6a54cbe68e66 /xmrstak/backend/amd/amd_gpu/gpu.cpp
parent406cf0fe6e696575a46a8dc34daa5532435bd013 (diff)
downloadxmr-stak-a7c5e97a123789cd894f2264a696ab23646212c2.zip
xmr-stak-a7c5e97a123789cd894f2264a696ab23646212c2.tar.gz
Update gpu.cpp
Fix for AMD GPU detection on MacOS X On MacOS X the platform is reported as Apple, and the vendor is reported as AMD.
Diffstat (limited to 'xmrstak/backend/amd/amd_gpu/gpu.cpp')
-rw-r--r--xmrstak/backend/amd/amd_gpu/gpu.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmrstak/backend/amd/amd_gpu/gpu.cpp b/xmrstak/backend/amd/amd_gpu/gpu.cpp
index 15b8457..879a2e4 100644
--- a/xmrstak/backend/amd/amd_gpu/gpu.cpp
+++ b/xmrstak/backend/amd/amd_gpu/gpu.cpp
@@ -476,7 +476,7 @@ std::vector<GpuContext> getAMDDevices(int index)
if(clStatus == CL_SUCCESS)
{
std::string devVendor(devVendorVec.data());
- if( devVendor.find("Advanced Micro Devices") != std::string::npos)
+ if( devVendor.find("Advanced Micro Devices") != std::string::npos || devVendor.find("AMD") != std::string::npos)
{
GpuContext ctx;
ctx.deviceIdx = k;
@@ -541,7 +541,7 @@ int getAMDPlatformIdx()
clGetPlatformInfo(platforms[i], CL_PLATFORM_VENDOR, infoSize, platformNameVec.data(), NULL);
std::string platformName(platformNameVec.data());
- if( platformName.find("Advanced Micro Devices") != std::string::npos)
+ if( platformName.find("Advanced Micro Devices") != std::string::npos || platformName.find("Apple") != std::string::npos)
{
platformIndex = i;
printer::inst()->print_msg(L0,"Found AMD platform index id = %i, name = %s",i , platformName.c_str());
OpenPOWER on IntegriCloud