From 292e93bf114139d520ed4497ccfb5a486b4900ed Mon Sep 17 00:00:00 2001 From: foreman Date: Wed, 27 Mar 2019 12:53:17 -0400 Subject: [PATCH] P4 to Git Change 1762349 by yaxunl@yaxunl-lc10 on 2019/03/27 11:50:12 SWDEV-145570 - Workaround for mismatch of device name and bundle id for gfx906. Affected files ... ... //depot/stg/opencl/drivers/opencl/api/hip/hip_platform.cpp#25 edit --- api/hip/hip_platform.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/api/hip/hip_platform.cpp b/api/hip/hip_platform.cpp index 09143adcf3..f2602babb1 100644 --- a/api/hip/hip_platform.cpp +++ b/api/hip/hip_platform.cpp @@ -100,7 +100,12 @@ extern "C" std::vector* __hipRegisterFatBinary(const void* data) amd::Context* ctx = g_devices[dev]; if (target.compare(ctx->devices()[0]->info().name_)) { - continue; + // Workaround for gfx906 device name mismatch. + // If bundle target id starts with gfx906 and device name starts with + // gfx906, treat them as match. + if (target.find("gfx906") != 0 || + std::string(ctx->devices()[0]->info().name_).find("gfx906") != 0) + continue; } amd::Program* program = new amd::Program(*ctx);