From 351ae122379e271ca84c8deadc687e1e2d0ee38f Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 23 Jul 2014 08:27:56 -0400
Subject: [PATCH] P4 to Git Change 1058289 by emankov@em-hsa-amd on 2014/07/23
08:19:09
ECR #333753 - Compiler Lib: back out CL 1056755 & 1056683
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#42 edit
[ROCm/clr commit: f57b7f8c2995bf5a56f99f413f52947036d7feb0]
---
.../lib/backends/common/v0_8/if_acl.cpp | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
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 c1715f4077..289c619018 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
@@ -1277,26 +1277,21 @@ internal_compile_failure:
#define CONDITIONAL_CMP_ASSIGN(A, B, C) A = (A && B != A) ? (A) : (C)
acl_error
-IsValidCompilationOptions(aclBinary *bin, aclLogFunction compile_callback)
+IsValidCompilationOptions(aclBinary *bin)
{
- acl_error error_code = ACL_SUCCESS;
#if defined(WITH_TARGET_HSAIL) && defined(WITH_TARGET_AMDIL)
amd::option::Options* opts = reinterpret_cast(bin->options);
std::string major = std::string(opts->oVariables->CLStd).substr(2,1);
- std::string error_msg;
if (isHSAILTarget(bin->target) && major == "1") {
- error_msg = "Error: HSAIL doesn't support OpenCL version < 2.0.";
- error_code = ACL_INVALID_OPTION;
+ std::cout << "Error: HSAIL doesn't support OpenCL version < 2.0" << std::endl;
+ return ACL_INVALID_OPTION;
}
if (isAMDILTarget(bin->target) && major == "2") {
- error_msg = "Error: AMDIL doesn't support OpenCL version >= 2.0.";
- error_code = ACL_INVALID_OPTION;
- }
- if (ACL_SUCCESS != error_code && compile_callback) {
- compile_callback(error_msg.c_str(), error_msg.size());
+ std::cout << "Error: AMDIL doesn't support OpenCL version >= 2.0" << std::endl;
+ return ACL_INVALID_OPTION;
}
#endif
- return error_code;
+ return ACL_SUCCESS;
}
acl_error ACL_API_ENTRY
@@ -1310,7 +1305,7 @@ if_aclCompile(aclCompiler *cl,
if (bin == NULL || cl == NULL) {
return ACL_INVALID_ARG;
}
- acl_error error_code = IsValidCompilationOptions(bin, compile_callback);
+ acl_error error_code = IsValidCompilationOptions(bin);
if (error_code != ACL_SUCCESS) {
return error_code;
}