From 5e860e3dc007c94e2da1dae07a8f567615b04b27 Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 30 Aug 2018 14:01:59 -0400 Subject: [PATCH] P4 to Git Change 1600103 by emankov@em-hsa on 2018/08/30 13:45:44 SWDEV-143465 - HSAIL - Compiler Lib - Stop supporting SPIR binary on CI+ as well This change plugs a hole when compiling from SPIR precompiled binary is possible on CI+ devices without option "-x spir" specified. SPIR text has been already deprecated. [Reviewers] Brian Sumner, Stanislav Mekhanoshin [Testing] http://ocltc.amd.com:8111/viewModification.html?modId=107222&personal=true&tab=vcsModificationBuilds Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#101 edit [ROCm/clr commit: da2aa0859e91bc1299a4ab83749a6ca66869e1c1] --- .../rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projects/clr/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp b/projects/clr/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp index a5443a5202..26f144d86d 100644 --- a/projects/clr/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp +++ b/projects/clr/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp @@ -1501,6 +1501,14 @@ if_aclCompile(aclCompiler *cl, } #ifdef WITH_TARGET_HSAIL if (isHSAILTarget(bin->target)) { + if (from == ACL_TYPE_SPIR_TEXT || from == ACL_TYPE_SPIR_BINARY) { + std::string error_msg = "Error: HSAIL doesn't support OpenCL extension spir."; + if (compile_callback) { + compile_callback(error_msg.c_str(), error_msg.size()); + } + appendLogToCL(cl, error_msg.c_str()); + return ACL_INVALID_BINARY; + } } else #endif {