P4 to Git Change 1098843 by mbareghe@mbareghe_staging_win30 on 2014/11/19 18:08:14

EPR #409798 - clCompileProgram and clLinkProgram regression for SPIR - set the correct IR type while extracting from binary (aclSPIR, aclLLVMIR) for single SPIR module for CPU.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpuprogram.cpp#62 edit


[ROCm/clr commit: 57a45f9066]
このコミットが含まれているのは:
foreman
2014-11-19 18:38:13 -05:00
コミット 7e8ccfc3c5
+4 -2
ファイルの表示
@@ -1066,7 +1066,9 @@ Program::linkImpl(
}
if (libs.size() > 0 && err == ACL_SUCCESS) do {
if (libs.size() > 1) {
unsigned int numLibs = libs.size() - 1;
bool resultIsSPIR = (llvmBinaryIsSpir[0] && numLibs == 0);
if (numLibs > 0) {
err = aclLink(compiler(), libs[0], libs.size() - 1, &libs[1],
ACL_TYPE_LLVMIR_BINARY, "-create-library", NULL);
@@ -1080,7 +1082,7 @@ Program::linkImpl(
size_t size = 0;
const void* llvmir = aclExtractSection(compiler(), libs[0],
&size, aclLLVMIR, &err);
&size, resultIsSPIR?aclSPIR:aclLLVMIR, &err);
if (err != ACL_SUCCESS) {
LogWarning("aclExtractSection failed");
break;