P4 to Git Change 1141872 by yaxunl@yaxunl_stg_win50 on 2015/04/17 10:17:05

ECR #354633 - SPIR: Making SPIR loading work for HSAIL path.
	Fixed arch type when creating elf for SPIR.
	Fixed query of elf for contained IR.
	Fixed copying elf binary containing SPIR for HSAIL path.
	Added translation of kernel name in SPIR loader for HSAIL path.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#65 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/include/v0_8/aclEnums.h#18 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/bif/bifbase.cpp#52 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Linker/AMDFixupKernelModule.cpp#6 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/SPIR/AMDSPIRLoader.cpp#91 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/SPIR/AMDSPIRLoader.h#15 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#177 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#192 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/complib/CLEnumCheck.cpp#42 edit


[ROCm/clr commit: d39ccbbfec]
This commit is contained in:
foreman
2015-04-17 10:24:36 -04:00
والد 0fde73d8d4
کامیت ef1de9294a
4فایلهای تغییر یافته به همراه43 افزوده شده و 10 حذف شده
@@ -1070,16 +1070,27 @@ Program::initClBinary(char* binaryIn, size_t size)
aclBinaryFini(aclbin_v30);
return false;
}
aclBinary* aclbin_v21 = aclCreateFromBinary(aclbin_v30,aclBIFVersion21);
err = aclWriteToMem(aclbin_v21, reinterpret_cast<void**>(&bin), &sz);
if (err != ACL_SUCCESS) {
LogWarning("aclWriteToMem failed");
if (info().arch_id == aclHSAIL || info().arch_id == aclHSAIL64) {
err = aclWriteToMem(aclbin_v30, reinterpret_cast<void**>(&bin), &sz);
if (err != ACL_SUCCESS) {
LogWarning("aclWriteToMem failed");
aclBinaryFini(aclbin_v30);
return false;
}
aclBinaryFini(aclbin_v30);
}
else {
aclBinary* aclbin_v21 = aclCreateFromBinary(aclbin_v30,aclBIFVersion21);
err = aclWriteToMem(aclbin_v21, reinterpret_cast<void**>(&bin), &sz);
if (err != ACL_SUCCESS) {
LogWarning("aclWriteToMem failed");
aclBinaryFini(aclbin_v30);
aclBinaryFini(aclbin_v21);
return false;
}
aclBinaryFini(aclbin_v30);
aclBinaryFini(aclbin_v21);
return false;
}
aclBinaryFini(aclbin_v30);
aclBinaryFini(aclbin_v21);
}
else
{