Print output from Kernel dtor to avoid segfault

Related-to: LOCI-1912
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
This commit is contained in:
Young Jin Yoon
2021-01-07 16:01:39 -08:00
committed by Compute-Runtime-Automation
parent 5845cb92ff
commit 4168ee8120
4 changed files with 24 additions and 15 deletions

View File

@@ -199,6 +199,8 @@ KernelImp::~KernelImp() {
alignedFree(perThreadDataForWholeThreadGroup);
}
if (printfBuffer != nullptr) {
//not allowed to call virtual function on destructor, so calling printOutput directly
PrintfHandler::printOutput(kernelImmData, this->printfBuffer, module->getDevice());
module->getDevice()->getNEODevice()->getMemoryManager()->freeGraphicsMemory(printfBuffer);
}
slmArgSizes.clear();