diff --git a/src/backend/opencl/generators/ocl_generic_kawpow_generator.cpp b/src/backend/opencl/generators/ocl_generic_kawpow_generator.cpp index 831c7a466..60a8721b4 100644 --- a/src/backend/opencl/generators/ocl_generic_kawpow_generator.cpp +++ b/src/backend/opencl/generators/ocl_generic_kawpow_generator.cpp @@ -46,6 +46,7 @@ bool ocl_generic_kawpow_generator(const OclDevice &device, const Algorithm &algo case OclDevice::Navi_10: case OclDevice::Navi_12: case OclDevice::Navi_14: + case OclDevice::Navi_21: isNavi = true; break; diff --git a/src/backend/opencl/generators/ocl_generic_rx_generator.cpp b/src/backend/opencl/generators/ocl_generic_rx_generator.cpp index 49a73f407..fa65fb43e 100644 --- a/src/backend/opencl/generators/ocl_generic_rx_generator.cpp +++ b/src/backend/opencl/generators/ocl_generic_rx_generator.cpp @@ -67,6 +67,10 @@ bool ocl_generic_rx_generator(const OclDevice &device, const Algorithm &algorith isNavi = true; break; + case OclDevice::Navi_21: + isNavi = true; + break; + default: break; } diff --git a/src/backend/opencl/runners/OclRxBaseRunner.cpp b/src/backend/opencl/runners/OclRxBaseRunner.cpp index 2a8cf6f93..c991b0c43 100644 --- a/src/backend/opencl/runners/OclRxBaseRunner.cpp +++ b/src/backend/opencl/runners/OclRxBaseRunner.cpp @@ -55,7 +55,7 @@ xmrig::OclRxBaseRunner::OclRxBaseRunner(size_t index, const OclLaunchData &data) m_gcn_version = 14; } - if (data.device.type() == OclDevice::Navi_10 || data.device.type() == OclDevice::Navi_12 || data.device.type() == OclDevice::Navi_14) { + if (data.device.type() == OclDevice::Navi_10 || data.device.type() == OclDevice::Navi_12 || data.device.type() == OclDevice::Navi_14 || data.device.type() == OclDevice::Navi_21) { m_gcn_version = 15; } diff --git a/src/backend/opencl/wrappers/OclDevice.cpp b/src/backend/opencl/wrappers/OclDevice.cpp index 18767d25d..7fc7d3025 100644 --- a/src/backend/opencl/wrappers/OclDevice.cpp +++ b/src/backend/opencl/wrappers/OclDevice.cpp @@ -138,12 +138,52 @@ static OclDevice::Type getType(const String &name, const OclVendor platformVendo if (platformVendorId == OCL_VENDOR_APPLE) { // Apple Platform: uses product names, not gfx# or codenames if (name.contains("AMD Radeon")) { - if (name.contains("Pro 5300M")) { + if (name.contains(" 450 ") || + name.contains(" 455 ") || + name.contains(" 460 ")) { + return OclDevice::Baffin; + } + + if (name.contains(" 555 ") || name.contains(" 555X ") || + name.contains(" 560 ") || name.contains(" 560X ") || + name.contains(" 570 ") || name.contains(" 570X ") || + name.contains(" 575 ") || name.contains(" 575X ")) { + return OclDevice::Polaris; + } + + if (name.contains(" 580 ") || name.contains(" 580X ")) { + return OclDevice::Ellesmere; + } + + if (name.contains(" Vega ")) { + if (name.contains(" 48 ") || + name.contains(" 56 ") || + name.contains(" 64 ") || + name.contains(" 64X ")) { + return OclDevice::Vega_10; + } + if (name.contains(" 16 ") || + name.contains(" 20 ") || + name.contains(" II ")) { + return OclDevice::Vega_20; + } + } + + if (name.contains(" 5700 ") || name.contains(" W5700X ")) { + return OclDevice::Navi_10; + } + + if (name.contains(" 5600 ") || name.contains(" 5600M ")) { + return OclDevice::Navi_12; + } + + if (name.contains(" 5300 ") || name.contains(" 5300M ") || + name.contains(" 5500 ") || name.contains(" 5500M ")) { return OclDevice::Navi_14; } - if (name.contains("RX 580")) { - return OclDevice::Polaris; + if (name.contains(" W6800 ") || name.contains(" W6900X ")) { + return OclDevice::Navi_21; } } } @@ -172,6 +212,10 @@ static OclDevice::Type getType(const String &name, const OclVendor platformVendo return OclDevice::Navi_14; } + if (name == "gfx1030") { + return OclDevice::Navi_21; + } + if (name == "gfx804") { return OclDevice::Lexa; } diff --git a/src/backend/opencl/wrappers/OclDevice.h b/src/backend/opencl/wrappers/OclDevice.h index 11dec1871..65aa74c1f 100644 --- a/src/backend/opencl/wrappers/OclDevice.h +++ b/src/backend/opencl/wrappers/OclDevice.h @@ -52,7 +52,8 @@ public: Raven, Navi_10, Navi_12, - Navi_14 + Navi_14, + Navi_21 }; OclDevice() = delete;