mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
fix: Print printf output on append to imm synchronous cmd lists
Related-To: NEO-7625 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
28bf57959e
commit
53971a2d28
@@ -149,6 +149,7 @@ struct CommandListCoreFamilyImmediate : public CommandListCoreFamily<gfxCoreFami
|
||||
void checkWaitEventsState(uint32_t numWaitEvents, ze_event_handle_t *waitEventList);
|
||||
|
||||
protected:
|
||||
void printKernelsPrintfOutput(bool hangDetected);
|
||||
std::atomic<bool> dependenciesPresent{false};
|
||||
};
|
||||
|
||||
|
||||
@@ -240,14 +240,15 @@ inline ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::executeCommand
|
||||
auto timeoutMicroseconds = NEO::TimeoutControls::maxTimeout;
|
||||
const auto waitStatus = csr->waitForCompletionWithTimeout(NEO::WaitParams{false, false, timeoutMicroseconds}, completionStamp.taskCount);
|
||||
if (waitStatus == NEO::WaitStatus::GpuHang) {
|
||||
this->printKernelsPrintfOutput(true);
|
||||
return ZE_RESULT_ERROR_DEVICE_LOST;
|
||||
}
|
||||
csr->getInternalAllocationStorage()->cleanAllocationList(completionStamp.taskCount, NEO::AllocationUsage::TEMPORARY_ALLOCATION);
|
||||
this->printKernelsPrintfOutput(false);
|
||||
}
|
||||
|
||||
this->cmdListCurrentStartOffset = commandStream->getUsed();
|
||||
this->containsAnyKernel = false;
|
||||
|
||||
this->handlePostSubmissionState();
|
||||
|
||||
if (NEO::DebugManager.flags.PauseOnEnqueue.get() != -1) {
|
||||
@@ -740,4 +741,12 @@ void CommandListCoreFamilyImmediate<gfxCoreFamily>::checkWaitEventsState(uint32_
|
||||
}
|
||||
}
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
void CommandListCoreFamilyImmediate<gfxCoreFamily>::printKernelsPrintfOutput(bool hangDetected) {
|
||||
size_t size = this->printfKernelContainer.size();
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
this->printfKernelContainer[i]->printPrintfOutput(hangDetected);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace L0
|
||||
|
||||
Reference in New Issue
Block a user