SWDEV-243423 - Avoid repeated metadata processing if the unbundled binary_ptr is same.
Change-Id: I71e008021b728dec61187d9ff29483ad8c4cad5c
This commit is contained in:
committed by
Karthik Jayaprakash
orang tua
9ed1767c02
melakukan
e993bf9f47
@@ -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