mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
feature: Experimental support of immediate cmd list in-order execution [1/n]
Related-To: LOCI-4332 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e35a7746a4
commit
14c3777409
@@ -24,6 +24,7 @@
|
||||
#include "shared/source/utilities/wait_util.h"
|
||||
|
||||
#include "level_zero/core/source/cmdlist/cmdlist.h"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_imp.h"
|
||||
#include "level_zero/core/source/cmdqueue/cmdqueue.h"
|
||||
#include "level_zero/core/source/context/context_imp.h"
|
||||
#include "level_zero/core/source/device/device.h"
|
||||
@@ -334,6 +335,10 @@ ze_result_t EventPool::openEventPoolIpcHandle(const ze_ipc_event_pool_handle_t &
|
||||
}
|
||||
|
||||
ze_result_t Event::destroy() {
|
||||
if (latestUsedInOrderCmdList) {
|
||||
latestUsedInOrderCmdList->unsetLastInOrderOutEvent(this->toHandle());
|
||||
}
|
||||
|
||||
delete this;
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ struct DriverHandle;
|
||||
struct DriverHandleImp;
|
||||
struct Device;
|
||||
struct Kernel;
|
||||
struct CommandListImp;
|
||||
|
||||
#pragma pack(1)
|
||||
struct IpcEventPoolData {
|
||||
@@ -200,6 +201,10 @@ struct Event : _ze_event_handle_t {
|
||||
this->metricStreamer = metricStreamer;
|
||||
}
|
||||
|
||||
void setLatestUsedInOrderCmdList(CommandListImp *newCmdList) {
|
||||
latestUsedInOrderCmdList = newCmdList;
|
||||
}
|
||||
|
||||
protected:
|
||||
Event(EventPool *eventPool, int index, Device *device) : device(device), eventPool(eventPool), index(index) {}
|
||||
|
||||
@@ -230,6 +235,7 @@ struct Event : _ze_event_handle_t {
|
||||
Device *device = nullptr;
|
||||
EventPool *eventPool = nullptr;
|
||||
Kernel *kernelWithPrintf = nullptr;
|
||||
CommandListImp *latestUsedInOrderCmdList = nullptr;
|
||||
|
||||
uint32_t maxKernelCount = 0;
|
||||
uint32_t kernelCount = 1u;
|
||||
|
||||
@@ -346,6 +346,10 @@ ze_result_t EventImp<TagSizeT>::hostSynchronize(uint64_t timeout) {
|
||||
|
||||
template <typename TagSizeT>
|
||||
ze_result_t EventImp<TagSizeT>::reset() {
|
||||
if (latestUsedInOrderCmdList) {
|
||||
latestUsedInOrderCmdList->unsetLastInOrderOutEvent(this->toHandle());
|
||||
latestUsedInOrderCmdList = nullptr;
|
||||
}
|
||||
this->resetCompletionStatus();
|
||||
this->resetDeviceCompletionData(false);
|
||||
this->l3FlushAppliedOnKernel.reset();
|
||||
|
||||
Reference in New Issue
Block a user