mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Detect GPU hang in clWaitForEvents
This change: - moves NEO::WaitStatus to a separate file - enables detection of GPU hang in clWaitForEvents - adjusts most of blocking calls in CommandStreamReceiver to return WaitStatus - adds ULTs to cover the new code Related-To: NEO-6681 Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
f2e1361541
commit
7f729b7f89
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@ -7,9 +7,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/command_stream/wait_status.h"
|
||||
|
||||
#include "opencl/source/event/event_builder.h"
|
||||
#include "opencl/source/event/user_event.h"
|
||||
|
||||
#include <optional>
|
||||
|
||||
namespace NEO {
|
||||
|
||||
#define FORWARD_CONSTRUCTOR(THIS_CLASS, BASE_CLASS) \
|
||||
@ -37,6 +41,16 @@ struct MockEvent : public BaseEventType {
|
||||
using Event::queueTimeStamp;
|
||||
using Event::submitTimeStamp;
|
||||
using Event::timestampPacketContainer;
|
||||
|
||||
WaitStatus wait(bool blocking, bool useQuickKmdSleep) override {
|
||||
if (waitReturnValue.has_value()) {
|
||||
return *waitReturnValue;
|
||||
}
|
||||
|
||||
return BaseEventType::wait(blocking, useQuickKmdSleep);
|
||||
}
|
||||
|
||||
std::optional<WaitStatus> waitReturnValue{};
|
||||
};
|
||||
|
||||
#undef FORWARD_CONSTRUCTOR
|
||||
|
Reference in New Issue
Block a user