mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
modify printPrintfOutput to be an atomic operation
Mutex was added to kernel_imp for atomic operation during printPrintfOutput on kernel. Related-To: LOCI-3681 Signed-off-by: Zhang, Winston <winston.zhang@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
bd32b21f7c
commit
c584d19a6c
@@ -974,6 +974,7 @@ void KernelImp::createPrintfBuffer() {
|
||||
}
|
||||
|
||||
void KernelImp::printPrintfOutput(bool hangDetected) {
|
||||
std::lock_guard<std::mutex> lock(this->printfLock);
|
||||
PrintfHandler::printOutput(kernelImmData, this->printfBuffer, module->getDevice(), hangDetected);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "level_zero/core/source/kernel/kernel.h"
|
||||
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
||||
namespace L0 {
|
||||
|
||||
@@ -230,6 +231,7 @@ struct KernelImp : Kernel {
|
||||
std::unique_ptr<NEO::ImplicitArgs> pImplicitArgs;
|
||||
|
||||
std::unique_ptr<KernelExt> pExtension;
|
||||
std::mutex printfLock;
|
||||
};
|
||||
|
||||
} // namespace L0
|
||||
|
||||
Reference in New Issue
Block a user