From f1bf6c2a7e20308f0dc9e641c4a82cff72e8f5a6 Mon Sep 17 00:00:00 2001 From: Zbigniew Zdanowicz Date: Mon, 20 Jun 2022 14:43:52 +0000 Subject: [PATCH] Fix signal event command list interface Signed-off-by: Zbigniew Zdanowicz --- level_zero/core/source/cmdlist/cmdlist_hw.h | 4 ++-- level_zero/core/source/cmdlist/cmdlist_hw.inl | 8 ++++---- level_zero/core/test/unit_tests/mocks/mock_cmdlist.h | 8 ++++---- .../test/unit_tests/sources/cmdlist/test_cmdlist_2.cpp | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.h b/level_zero/core/source/cmdlist/cmdlist_hw.h index 910748335e..a36e0fd165 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.h +++ b/level_zero/core/source/cmdlist/cmdlist_hw.h @@ -191,7 +191,7 @@ struct CommandListCoreFamily : CommandListImp { Builtin builtin, const ze_copy_region_t *dstRegion, uint32_t dstPitch, size_t dstOffset, const ze_copy_region_t *srcRegion, uint32_t srcPitch, - size_t srcOffset, ze_event_handle_t hSignalEvent, + size_t srcOffset, Event *signalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents); MOCKABLE_VIRTUAL ze_result_t appendMemoryCopyKernel3d(AlignedAllocationData *dstAlignedAllocation, AlignedAllocationData *srcAlignedAllocation, @@ -199,7 +199,7 @@ struct CommandListCoreFamily : CommandListImp { uint32_t dstPitch, uint32_t dstSlicePitch, size_t dstOffset, const ze_copy_region_t *srcRegion, uint32_t srcPitch, uint32_t srcSlicePitch, size_t srcOffset, - ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, + Event *signalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents); MOCKABLE_VIRTUAL ze_result_t appendBlitFill(void *ptr, const void *pattern, diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.inl b/level_zero/core/source/cmdlist/cmdlist_hw.inl index e3af5f884d..f49511fcbd 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw.inl @@ -1326,7 +1326,7 @@ ze_result_t CommandListCoreFamily::appendMemoryCopyKernel3d(Align uint32_t srcPitch, uint32_t srcSlicePitch, size_t srcOffset, - ze_event_handle_t hSignalEvent, + Event *signalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents) { @@ -1375,7 +1375,7 @@ ze_result_t CommandListCoreFamily::appendMemoryCopyKernel3d(Align launchParams.isDestinationAllocationInSystemMemory = (dstAllocationType == NEO::AllocationType::BUFFER_HOST_MEMORY) || (dstAllocationType == NEO::AllocationType::EXTERNAL_HOST_PTR); - return CommandListCoreFamily::appendLaunchKernel(builtinFunction->toHandle(), &dispatchFuncArgs, hSignalEvent, numWaitEvents, + return CommandListCoreFamily::appendLaunchKernel(builtinFunction->toHandle(), &dispatchFuncArgs, signalEvent, numWaitEvents, phWaitEvents, launchParams); } @@ -1389,7 +1389,7 @@ ze_result_t CommandListCoreFamily::appendMemoryCopyKernel2d(Align const ze_copy_region_t *srcRegion, uint32_t srcPitch, size_t srcOffset, - ze_event_handle_t hSignalEvent, + Event *signalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents) { @@ -1436,7 +1436,7 @@ ze_result_t CommandListCoreFamily::appendMemoryCopyKernel2d(Align (dstAllocationType == NEO::AllocationType::BUFFER_HOST_MEMORY) || (dstAllocationType == NEO::AllocationType::EXTERNAL_HOST_PTR); return CommandListCoreFamily::appendLaunchKernel(builtinFunction->toHandle(), - &dispatchFuncArgs, hSignalEvent, + &dispatchFuncArgs, signalEvent, numWaitEvents, phWaitEvents, launchParams); diff --git a/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h b/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h index 0e7f15ec15..b68ca51620 100644 --- a/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h +++ b/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h @@ -419,11 +419,11 @@ class MockAppendMemoryCopy : public CommandListCoreFamily { Builtin builtin, const ze_copy_region_t *dstRegion, uint32_t dstPitch, size_t dstOffset, const ze_copy_region_t *srcRegion, uint32_t srcPitch, - size_t srcOffset, ze_event_handle_t hSignalEvent, + size_t srcOffset, Event *signalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents) override { srcAlignedPtr = srcAlignedAllocation->alignedAllocationPtr; dstAlignedPtr = dstAlignedAllocation->alignedAllocationPtr; - return L0::CommandListCoreFamily::appendMemoryCopyKernel2d(dstAlignedAllocation, srcAlignedAllocation, builtin, dstRegion, dstPitch, dstOffset, srcRegion, srcPitch, srcOffset, hSignalEvent, numWaitEvents, phWaitEvents); + return L0::CommandListCoreFamily::appendMemoryCopyKernel2d(dstAlignedAllocation, srcAlignedAllocation, builtin, dstRegion, dstPitch, dstOffset, srcRegion, srcPitch, srcOffset, signalEvent, numWaitEvents, phWaitEvents); } ze_result_t appendMemoryCopyKernel3d(AlignedAllocationData *dstAlignedAllocation, AlignedAllocationData *srcAlignedAllocation, @@ -431,11 +431,11 @@ class MockAppendMemoryCopy : public CommandListCoreFamily { uint32_t dstPitch, uint32_t dstSlicePitch, size_t dstOffset, const ze_copy_region_t *srcRegion, uint32_t srcPitch, uint32_t srcSlicePitch, size_t srcOffset, - ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, + Event *signalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents) override { srcAlignedPtr = srcAlignedAllocation->alignedAllocationPtr; dstAlignedPtr = dstAlignedAllocation->alignedAllocationPtr; - return L0::CommandListCoreFamily::appendMemoryCopyKernel3d(dstAlignedAllocation, srcAlignedAllocation, builtin, dstRegion, dstPitch, dstSlicePitch, dstOffset, srcRegion, srcPitch, srcSlicePitch, srcOffset, hSignalEvent, numWaitEvents, phWaitEvents); + return L0::CommandListCoreFamily::appendMemoryCopyKernel3d(dstAlignedAllocation, srcAlignedAllocation, builtin, dstRegion, dstPitch, dstSlicePitch, dstOffset, srcRegion, srcPitch, srcSlicePitch, srcOffset, signalEvent, numWaitEvents, phWaitEvents); } ze_result_t appendMemoryCopyBlitRegion(NEO::GraphicsAllocation *srcAllocation, diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_2.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_2.cpp index 0b98a4173c..d8c0be59d3 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_2.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_2.cpp @@ -98,7 +98,7 @@ class MockCommandListHw : public WhiteBox<::L0::CommandListCoreFamily