SWDEV-243423 - Avoid repeated metadata processing if the unbundled binary_ptr is same.
Change-Id: I71e008021b728dec61187d9ff29483ad8c4cad5c
[ROCm/clr commit: e993bf9f47]
This commit is contained in:
committed by
Karthik Jayaprakash
parent
39ddb8d8d4
commit
701914416e
@@ -1978,7 +1978,7 @@ bool Program::initClBinary(const char* binaryIn, size_t size) {
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
bool Program::setBinary(const char* binaryIn, size_t size) {
|
||||
bool Program::setBinary(const char* binaryIn, size_t size, const device::Program* same_dev_prog) {
|
||||
if (!initClBinary(binaryIn, size)) {
|
||||
DevLogError("Init CL Binary failed \n");
|
||||
return false;
|
||||
@@ -2025,8 +2025,13 @@ bool Program::setBinary(const char* binaryIn, size_t size) {
|
||||
return false;
|
||||
}
|
||||
|
||||
clBinary()->loadCompileOptions(compileOptions_);
|
||||
clBinary()->loadLinkOptions(linkOptions_);
|
||||
if (same_dev_prog != nullptr) {
|
||||
compileOptions_ = same_dev_prog->compileOptions();
|
||||
linkOptions_ = same_dev_prog->linkOptions();
|
||||
} else {
|
||||
clBinary()->loadCompileOptions(compileOptions_);
|
||||
clBinary()->loadLinkOptions(linkOptions_);
|
||||
}
|
||||
|
||||
clBinary()->resetElfIn();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user