From 2adfd0343a2ea0d7d787315303a1cc115e135843 Mon Sep 17 00:00:00 2001 From: foreman Date: Tue, 10 Nov 2015 08:17:59 -0500 Subject: [PATCH] P4 to Git Change 1209406 by emankov@em-hsa-amd on 2015/11/10 08:12:09 SWDEV-77584 - ORCA RT: Preparations for enabling HSAIL on OpenCL 1.2 by default. Fix regression by CL 1208929 in blit compilation. [Regression] CL 1208929 causes the following OpenCL Sanity Lnx/Win7/Win8.1 32-bit tests on CI+ GPU (Kalindi, Bonaire, Hawaii): BufferBandwidth, CplusplusWrapper, DynamicOpenCLDetection, ImageBandwidth, KernelLaunch crashes with: :2:..\..\..\gpucompiler.cpp:441: aclCompile failed : :1:..\..\..\gpudevice.cpp:955: Couldn't create blit kernels! [Testing] OCL SDK 2.9 (32bit/64bit), pre-checkin: http://ocltc.amd.com:8111/viewModification.html?modId=62012&personal=true&buildTypeId=&tab=vcsModificationBuilds&show_all_builds=true Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#535 edit [ROCm/clr commit: 8c29379c3f285872bb5c76fd9fd12249996e98fe] --- projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp b/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp index 96a3462653..0427e69775 100644 --- a/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp +++ b/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp @@ -228,9 +228,13 @@ NullDevice::isHsailProgram(amd::option::Options* options) { } optvec.push_back(&parsedOptions); for (auto const op : optvec) { + // TODO: Remove isOCL20 related code from this function along with switching HSAIL by default + if (isCIPlus && amd::Program::GetOclCVersion(op->oVariables->CLStd) >= 20) { + isOCL20 = true; + } if (op->oVariables->clInternalKernel) { isBlit = true; - continue; + break; } if (!isLegacy) { isLegacy = op->oVariables->Legacy; @@ -256,13 +260,9 @@ NullDevice::isHsailProgram(amd::option::Options* options) { if (!isSPIRV) { isSPIRV = op->oVariables->BinaryIsSpirv; } - // TODO: Remove isOCL20 related code from this function along with switching HSAIL by default - if (isCIPlus && amd::Program::GetOclCVersion(op->oVariables->CLStd) >= 20) { - isOCL20 = true; - } isInputOptions = false; } - if (isSPIRV || (isBlit && isCIPlus) || isClang || isOCL20) { + if (isSPIRV || (isBlit && isCIPlus && isHSAILcapable) || isClang || isOCL20) { return true; } if (isLegacy || !isHSAILcapable || isEDG || isLangExt) {