P4 to Git Change 1077370 by emankov@em-hsa-amd on 2014/09/16 12:02:36
ECR #333753 - HSA RT: avoiding superfluous recompilations on ORCA RT/HSA path Next compilation stage determination based on binary sections and options (while linkImpl). If current HSAILProgram options are equal to binarys ones: - Do not generate BRIG if BRIG sections are already presented in binary. - Do not finalize BRIG->ISA if ISA is already presented in binary. - Perform only CG phase if HSAIL is absent in binary. Always perform only brig loading (even in case of ISA presented). Testing: pre check-in, compile & basic ocl conformance 2.0 tests Reviewer: German Andryeyev Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpucompiler.cpp#150 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#264 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.hpp#101 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#177 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.hpp#55 edit
This commit is contained in:
@@ -3510,26 +3510,26 @@ HSAILKernel::~HSAILKernel()
|
||||
}
|
||||
|
||||
bool
|
||||
HSAILKernel::init()
|
||||
HSAILKernel::init(bool finalize)
|
||||
{
|
||||
acl_error error;
|
||||
//compile kernel down to ISA
|
||||
std::string openClKernelName("&__OpenCL_" + name() + "_kernel");
|
||||
|
||||
std::string options(compileOptions_.c_str());
|
||||
options.append(" -just-kernel=");
|
||||
options.append(openClKernelName.c_str());
|
||||
if (finalize) {
|
||||
std::string options(compileOptions_.c_str());
|
||||
options.append(" -just-kernel=");
|
||||
options.append(openClKernelName.c_str());
|
||||
error = aclCompile(dev().hsaCompiler(), prog().binaryElf(),
|
||||
options.c_str(), ACL_TYPE_CG, ACL_TYPE_ISA, NULL);
|
||||
buildLog_ += aclGetCompilerLog(dev().hsaCompiler());
|
||||
if (error != ACL_SUCCESS) {
|
||||
LogError("Failed to finalize");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Get the ISA out
|
||||
size_t size_isa;
|
||||
void* shader_isa = NULL;
|
||||
error = aclCompile(dev().hsaCompiler(), prog().binaryElf(),
|
||||
options.c_str(), ACL_TYPE_CG, ACL_TYPE_ISA, NULL);
|
||||
buildLog_ += aclGetCompilerLog(dev().hsaCompiler());
|
||||
if (error != ACL_SUCCESS) {
|
||||
LogError("Failed to finalize");
|
||||
return false;
|
||||
}
|
||||
|
||||
shader_isa = const_cast<void *>(aclGetDeviceBinary(dev().hsaCompiler(),
|
||||
prog().binaryElf(), openClKernelName.c_str(), &size_isa, &error));
|
||||
if (shader_isa == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user