From f8e4a0ac7cdb869cd547bc298f36e305e8c16ee9 Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 27 Aug 2015 18:06:50 -0400
Subject: [PATCH] P4 to Git Change 1185396 by rayxiao@alit_opencl_rayxiao on
2015/08/27 17:58:08
ECR #340775 - Revert runtime changes to linkImpl for enabling OpenCL1.2 on non-legacy path.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#205 edit
---
rocclr/runtime/device/gpu/gpuprogram.cpp | 25 +++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/rocclr/runtime/device/gpu/gpuprogram.cpp b/rocclr/runtime/device/gpu/gpuprogram.cpp
index f34b6d6d8e..fbf14dedea 100644
--- a/rocclr/runtime/device/gpu/gpuprogram.cpp
+++ b/rocclr/runtime/device/gpu/gpuprogram.cpp
@@ -1830,17 +1830,20 @@ HSAILProgram::linkImpl(
for (size_t i = 1; i < binaries_to_link.size(); i++) {
aclBinaryFini(binaries_to_link[i]);
}
- if (createLibrary || options->oVariables->EnableDebug) {
- // Save the binary in the interface class
- size_t size = 0;
- void *mem = NULL;
- aclWriteToMem(binaryElf_, &mem, &size);
- setBinary(static_cast(mem), size);
- if (createLibrary)
- setType(TYPE_LIBRARY);
- buildLog_ += aclGetCompilerLog(dev().hsaCompiler());
- return true;
- }
+ // Uncomment when CL1.2 support on HSAIL is enabled,
+ // Otherwise ocltst's OCLSeparateCompile will fail
+ // on the non-legacy path with CL1.2
+ // if (createLibrary || options->oVariables->EnableDebug) {
+ // // Save the binary in the interface class
+ // size_t size = 0;
+ // void *mem = NULL;
+ // aclWriteToMem(binaryElf_, &mem, &size);
+ // setBinary(static_cast(mem), size);
+ // if (createLibrary)
+ // setType(TYPE_LIBRARY);
+ // buildLog_ += aclGetCompilerLog(dev().hsaCompiler());
+ // return true;
+ // }
// Now call linkImpl with the new options
return linkImpl(options);
}