P4 to Git Change 1098569 by mbareghe@mbareghe_staging_win30 on 2014/11/19 10:23:56

EPR #409840 - [CQE OCL][LNX][QR] OpenCL SPIR Conf test "Compile_and_link" failed in all Asics due to CL#1098110 - Set the IR type to SPIR only for single SPIR modules.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#184 edit


[ROCm/clr commit: f324bf5f80]
This commit is contained in:
foreman
2014-11-19 10:38:39 -05:00
parent d599b91524
commit d75064b500
@@ -725,6 +725,8 @@ NullProgram::linkImpl(const std::vector<device::Program*>& inputPrograms,
if (libs.size() > 0 && err == ACL_SUCCESS) do {
unsigned int numLibs = libs.size() - 1;
bool resultIsSPIR = (llvmBinaryIsSpir[0] && numLibs == 0);
if (numLibs > 0) {
err = aclLink(dev().compiler(), libs[0], numLibs, &libs[1],
ACL_TYPE_LLVMIR_BINARY, "-create-library", NULL);
@@ -739,7 +741,7 @@ NullProgram::linkImpl(const std::vector<device::Program*>& inputPrograms,
size_t size = 0;
const void* llvmir = aclExtractSection(dev().compiler(), libs[0],
&size, llvmBinaryIsSpir[0]?aclSPIR:aclLLVMIR, &err);
&size, resultIsSPIR?aclSPIR:aclLLVMIR, &err);
if (err != ACL_SUCCESS) {
LogWarning("aclExtractSection failed");
break;