P4 to Git Change 1195730 by smekhano@stas-rampitec-hsa on 2015/09/29 20:53:01

SWDEV-77584 - HSA HLC: fixed reflection metadata generation on HSAIL OCL 1.2 path
	We are producing 6 extra arguments, but metadata was produced only for 3.
	Removed KE_OCL12_NUM_ARGS define to avoid confusion.

	Testing: smoke, precheckin
	Reviewed by Yaxun Liu

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/AMDOpenCLKernenv.h#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/Scalar/AMDInsertOpenCLKernenv.cpp#10 edit
Этот коммит содержится в:
foreman
2015-09-30 00:10:02 -04:00
родитель 1eab831776
Коммит fa3fd90fb0
5 изменённых файлов: 61 добавлений и 22 удалений
+20 -2
Просмотреть файл
@@ -1801,9 +1801,27 @@ HSAILProgram::linkImpl(
const void *llvmirText = aclExtractSection(dev().hsaCompiler(),
binaryElf_, &llvmirSize, aclLLVMIR, &errorCode);
if (errorCode != ACL_SUCCESS) {
buildLog_ +="Error while linking : \
bool spirv = false;
size_t boolSize = sizeof(bool);
errorCode = aclQueryInfo(dev().hsaCompiler(), binaryElf_,
RT_CONTAINS_SPIRV, NULL, &spirv, &boolSize);
if (errorCode != ACL_SUCCESS) {
spirv = false;
}
if (spirv) {
errorCode = aclCompile(dev().hsaCompiler(), binaryElf_,
options->origOptionStr.c_str(), ACL_TYPE_SPIRV_BINARY,
ACL_TYPE_LLVMIR_BINARY, NULL);
buildLog_ += aclGetCompilerLog(dev().hsaCompiler());
if (errorCode != ACL_SUCCESS) {
buildLog_ += "Error while linking: Could not load SPIR-V" ;
return false;
}
} else {
buildLog_ +="Error while linking : \
Invalid binary (Missing LLVMIR section)" ;
return false;
return false;
}
}
// Create a new aclBinary for each LLVMIR and save it in a list
aclBIFVersion ver = aclBinaryVersion(binaryElf_);