SWDEV-277566 - Separate code object loading from building
Change-Id: I87b8178f55e8ef23762dfe11fab71665ba680f00
Этот коммит содержится в:
1 родитель
509f528980
Коммит
211ba25b4e
13 files changed
+283
-168
No files matched your search
@@ -622,6 +622,28 @@ int32_t Program::build(const std::vector<Device*>& devices, const char* options,
|
||||
}
|
||||
|
||||
bool Program::load(const std::vector<Device*>& devices) {
|
||||
ScopedLock sl(buildLock_);
|
||||
|
||||
for (const auto& it : devicePrograms_) {
|
||||
const Device& device = *(it.first);
|
||||
|
||||
// If devices is specified, only load code object for those devices
|
||||
if (std::find(devices.begin(), devices.end(), &device) != devices.end()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
device::Program& devProgram = *(it.second);
|
||||
|
||||
// Only load the code object once
|
||||
if (devProgram.isCodeObjectLoaded()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!devProgram.load()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user