P4 to Git Change 1471997 by lmoriche@lmoriche_opencl_dev2 on 2017/10/18 11:30:15
SWDEV-132888 - OCL kernel execution time is long at the first run on Linux, Vega, HSAIL (ProRender unit test)
Don't finalize ISA binaries if recompilation is not requested.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#74 edit
[ROCm/clr commit: d53d7be489]
This commit is contained in:
@@ -1092,20 +1092,20 @@ bool HSAILProgram::linkImpl(amd::option::Options* options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(WITH_LIGHTNING_COMPILER)
|
#if !defined(WITH_LIGHTNING_COMPILER)
|
||||||
hsa_agent_t hsaDevice = dev().getBackendDevice();
|
if (finalize) {
|
||||||
|
std::string fin_options(options->origOptionStr);
|
||||||
std::string fin_options(options->origOptionStr);
|
// Append an option so that we can selectively enable a SCOption on CZ
|
||||||
// Append an option so that we can selectively enable a SCOption on CZ
|
// whenever IOMMUv2 is enabled.
|
||||||
// whenever IOMMUv2 is enabled.
|
if (dev().isFineGrainedSystem(true)) {
|
||||||
if (dev().isFineGrainedSystem(true)) {
|
fin_options.append(" -sc-xnack-iommu");
|
||||||
fin_options.append(" -sc-xnack-iommu");
|
}
|
||||||
}
|
errorCode = aclCompile(dev().compiler(), binaryElf_, fin_options.c_str(), ACL_TYPE_CG,
|
||||||
errorCode = aclCompile(dev().compiler(), binaryElf_, fin_options.c_str(), ACL_TYPE_CG,
|
ACL_TYPE_ISA, logFunction);
|
||||||
ACL_TYPE_ISA, logFunction);
|
buildLog_ += aclGetCompilerLog(dev().compiler());
|
||||||
buildLog_ += aclGetCompilerLog(dev().compiler());
|
if (errorCode != ACL_SUCCESS) {
|
||||||
if (errorCode != ACL_SUCCESS) {
|
buildLog_ += "Error: BRIG finalization to ISA failed.\n";
|
||||||
buildLog_ += "Error: BRIG finalization to ISA failed.\n";
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
}
|
||||||
size_t secSize;
|
size_t secSize;
|
||||||
void* data =
|
void* data =
|
||||||
@@ -1135,6 +1135,7 @@ bool HSAILProgram::linkImpl(amd::option::Options* options) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hsa_agent_t hsaDevice = dev().getBackendDevice();
|
||||||
status = hsa_executable_load_agent_code_object(hsaExecutable_, hsaDevice, codeObjectReader,
|
status = hsa_executable_load_agent_code_object(hsaExecutable_, hsaDevice, codeObjectReader,
|
||||||
nullptr, nullptr);
|
nullptr, nullptr);
|
||||||
if (status != HSA_STATUS_SUCCESS) {
|
if (status != HSA_STATUS_SUCCESS) {
|
||||||
|
|||||||
Reference in New Issue
Block a user