SWDEV-284895 - Adding kind metadata and launch init/fini marked kernels

Change-Id: If2b21c4b98567632c426943e0b69aca8d6f1ec2a


[ROCm/clr commit: 102aa9d6d9]
This commit is contained in:
anusha GodavarthySurya
2021-12-01 08:17:44 -08:00
parent 0ef7ea3ad9
commit 02e46ec231
6 ha cambiato i file con 123 aggiunte e 3 eliminazioni
@@ -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;