SWDEV-284895 - Adding kind metadata and launch init/fini marked kernels
Change-Id: If2b21c4b98567632c426943e0b69aca8d6f1ec2a
[ROCm/clr commit: 102aa9d6d9]
This commit is contained in:
@@ -89,6 +89,15 @@ Program::~Program() {
|
||||
//! @todo Make sure we have destroyed all CPU specific objects
|
||||
}
|
||||
|
||||
void Program::unload() {
|
||||
for (const auto& it : devicePrograms_) {
|
||||
device::Program& devProgram = *(it.second);
|
||||
if (!devProgram.runFiniKernels()) {
|
||||
LogError("Error running fini kernels for devprogram");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const Symbol* Program::findSymbol(const char* kernelName) const {
|
||||
// avoid seg. fault if the program has not built yet
|
||||
if (symbolTable_ == NULL) {
|
||||
@@ -621,6 +630,11 @@ bool Program::load(const std::vector<Device*>& devices) {
|
||||
if (!devProgram.load()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Run kernels marked with init
|
||||
if (!devProgram.runInitKernels()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user