P4 to Git Change 1608975 by gandryey@gera-w8 on 2018/09/20 18:14:01

SWDEV-79445 - OCL generic changes and code clean-up
	Program compilation clean-up. Follwoing CL#1608319:
	- Switch HSAIL GSL path to the common compilation method

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpucompiler.cpp#160 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#168 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#332 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#242 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.hpp#75 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#74 edit


[ROCm/clr commit: dbe7f3201d]
Этот коммит содержится в:
foreman
2018-09-20 18:26:16 -04:00
родитель d98750b0bb
Коммит c5b9715a6b
6 изменённых файлов: 26 добавлений и 142 удалений
+6 -4
Просмотреть файл
@@ -538,7 +538,7 @@ bool NullProgram::linkImpl(const std::vector<device::Program*>& inputPrograms,
} else {
aclTypeUsed = aclLLVMIR;
}
err = aclInsertSection(dev().compiler(), libs[i], llvmBinaries[i]->data(),
err = aclInsertSection(dev().amdilCompiler(), libs[i], llvmBinaries[i]->data(),
llvmBinaries[i]->size(), aclTypeUsed);
if (err != ACL_SUCCESS) {
LogWarning("aclInsertSection failed");
@@ -555,10 +555,10 @@ bool NullProgram::linkImpl(const std::vector<device::Program*>& inputPrograms,
unsigned int numLibs = libs.size() - 1;
if (numLibs > 0) {
err = aclLink(dev().compiler(), libs[0], numLibs, &libs[1], ACL_TYPE_LLVMIR_BINARY,
err = aclLink(dev().amdilCompiler(), libs[0], numLibs, &libs[1], ACL_TYPE_LLVMIR_BINARY,
"-create-library", NULL);
buildLog_ += aclGetCompilerLog(dev().compiler());
buildLog_ += aclGetCompilerLog(dev().amdilCompiler());
if (err != ACL_SUCCESS) {
LogWarning("aclLink failed");
@@ -575,7 +575,7 @@ bool NullProgram::linkImpl(const std::vector<device::Program*>& inputPrograms,
} else {
aclTypeUsed = aclLLVMIR;
}
const void* llvmir = aclExtractSection(dev().compiler(), libs[0], &size, aclTypeUsed, &err);
const void* llvmir = aclExtractSection(dev().amdilCompiler(), libs[0], &size, aclTypeUsed, &err);
if (err != ACL_SUCCESS) {
LogWarning("aclExtractSection failed");
break;
@@ -1532,6 +1532,7 @@ HSAILProgram::HSAILProgram(Device& device)
maxScratchRegs_(0),
executable_(NULL),
loaderContext_(this) {
machineTarget_ = dev().hwInfo()->targetName_;
loader_ = amd::hsa::loader::Loader::Create(&loaderContext_);
}
@@ -1543,6 +1544,7 @@ HSAILProgram::HSAILProgram(NullDevice& device)
executable_(NULL),
loaderContext_(this) {
isNull_ = true;
machineTarget_ = dev().hwInfo()->targetName_;
loader_ = amd::hsa::loader::Loader::Create(&loaderContext_);
}