Skip to content

Commit bbb0e9d

Browse files
Fix to Append signal/ wait events for appendMemoryFill & appendMemoryCopyRegion
Signed-off-by: Vinod Tipparaju <[email protected]>
1 parent 6e8e882 commit bbb0e9d

File tree

10 files changed

+1067
-87
lines changed

10 files changed

+1067
-87
lines changed

level_zero/api/core/ze_copy.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ zeCommandListAppendMemoryFill(
3030
ze_event_handle_t hEvent,
3131
uint32_t numWaitEvents,
3232
ze_event_handle_t *phWaitEvents) {
33-
return L0::CommandList::fromHandle(hCommandList)->appendMemoryFill(ptr, pattern, patternSize, size, hEvent);
33+
return L0::CommandList::fromHandle(hCommandList)->appendMemoryFill(ptr, pattern, patternSize, size, hEvent, numWaitEvents, phWaitEvents);
3434
}
3535

3636
ZE_APIEXPORT ze_result_t ZE_APICALL
@@ -47,7 +47,7 @@ zeCommandListAppendMemoryCopyRegion(
4747
ze_event_handle_t hEvent,
4848
uint32_t numWaitEvents,
4949
ze_event_handle_t *phWaitEvents) {
50-
return L0::CommandList::fromHandle(hCommandList)->appendMemoryCopyRegion(dstptr, dstRegion, dstPitch, dstSlicePitch, srcptr, srcRegion, srcPitch, srcSlicePitch, hEvent);
50+
return L0::CommandList::fromHandle(hCommandList)->appendMemoryCopyRegion(dstptr, dstRegion, dstPitch, dstSlicePitch, srcptr, srcRegion, srcPitch, srcSlicePitch, hEvent, numWaitEvents, phWaitEvents);
5151
}
5252

5353
ZE_APIEXPORT ze_result_t ZE_APICALL

level_zero/core/source/cmdlist/cmdlist.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,12 @@ struct CommandList : _ze_command_list_handle_t {
9191
const ze_copy_region_t *srcRegion,
9292
uint32_t srcPitch,
9393
uint32_t srcSlicePitch,
94-
ze_event_handle_t hSignalEvent) = 0;
94+
ze_event_handle_t hSignalEvent,
95+
uint32_t numWaitEvents,
96+
ze_event_handle_t *phWaitEvents) = 0;
9597
virtual ze_result_t appendMemoryFill(void *ptr, const void *pattern,
96-
size_t patternSize, size_t size, ze_event_handle_t hEvent) = 0;
98+
size_t patternSize, size_t size, ze_event_handle_t hSignalEvent,
99+
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents) = 0;
97100
virtual ze_result_t appendMemoryPrefetch(const void *ptr, size_t count) = 0;
98101
virtual ze_result_t appendSignalEvent(ze_event_handle_t hEvent) = 0;
99102
virtual ze_result_t appendWaitOnEvents(uint32_t numEvents, ze_event_handle_t *phEvent) = 0;

level_zero/core/source/cmdlist/cmdlist_hw.h

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,15 @@ struct CommandListCoreFamily : CommandListImp {
107107
const ze_copy_region_t *srcRegion,
108108
uint32_t srcPitch,
109109
uint32_t srcSlicePitch,
110-
ze_event_handle_t hSignalEvent) override;
110+
ze_event_handle_t hSignalEvent,
111+
uint32_t numWaitEvents,
112+
ze_event_handle_t *phWaitEvents) override;
111113
ze_result_t appendMemoryPrefetch(const void *ptr, size_t count) override;
112114
ze_result_t appendMemoryFill(void *ptr, const void *pattern,
113115
size_t patternSize, size_t size,
114-
ze_event_handle_t hEvent) override;
116+
ze_event_handle_t hSignalEvent,
117+
uint32_t numWaitEvents,
118+
ze_event_handle_t *phWaitEvents) override;
115119

116120
ze_result_t appendMILoadRegImm(uint32_t reg, uint32_t value) override;
117121
ze_result_t appendMILoadRegReg(uint32_t reg1, uint32_t reg2) override;
@@ -163,7 +167,8 @@ struct CommandListCoreFamily : CommandListImp {
163167
ze_copy_region_t dstRegion, Vec3<size_t> copySize,
164168
size_t srcRowPitch, size_t srcSlicePitch,
165169
size_t dstRowPitch, size_t dstSlicePitch,
166-
Vec3<uint32_t> srcSize, Vec3<uint32_t> dstSize, ze_event_handle_t hSignalEvent);
170+
Vec3<uint32_t> srcSize, Vec3<uint32_t> dstSize, ze_event_handle_t hSignalEvent,
171+
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents);
167172

168173
MOCKABLE_VIRTUAL ze_result_t appendMemoryCopyKernel2d(AlignedAllocationData *dstAlignedAllocation, AlignedAllocationData *srcAlignedAllocation,
169174
Builtin builtin, const ze_copy_region_t *dstRegion,
@@ -182,7 +187,9 @@ struct CommandListCoreFamily : CommandListImp {
182187

183188
MOCKABLE_VIRTUAL ze_result_t appendBlitFill(void *ptr, const void *pattern,
184189
size_t patternSize, size_t size,
185-
ze_event_handle_t hEvent);
190+
ze_event_handle_t hSignalEvent,
191+
uint32_t numWaitEvents,
192+
ze_event_handle_t *phWaitEvents);
186193

187194
MOCKABLE_VIRTUAL ze_result_t appendCopyImageBlit(NEO::GraphicsAllocation *src,
188195
NEO::GraphicsAllocation *dst,

0 commit comments

Comments
 (0)