@@ -163,20 +163,26 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
163
163
threadGroupDimensions->groupCountY ,
164
164
threadGroupDimensions->groupCountZ );
165
165
}
166
- NEO::GraphicsAllocation *eventAlloc = nullptr ;
166
+
167
167
uint64_t eventAddress = 0 ;
168
168
bool isTimestampEvent = false ;
169
169
bool l3FlushEnable = false ;
170
170
bool isHostSignalScopeEvent = launchParams.isHostSignalScopeEvent ;
171
+ Event *compactEvent = nullptr ;
171
172
if (event) {
172
- eventAlloc = &event->getAllocation (this ->device );
173
- commandContainer.addToResidencyContainer (eventAlloc);
174
- bool flushRequired = !!event->signalScope &&
175
- !launchParams.isKernelSplitOperation ;
176
- l3FlushEnable = getDcFlushRequired (flushRequired);
177
- isTimestampEvent = event->isUsingContextEndOffset ();
178
- eventAddress = event->getPacketAddress (this ->device );
179
173
isHostSignalScopeEvent = !!(event->signalScope & ZE_EVENT_SCOPE_FLAG_HOST);
174
+ if (compactL3FlushEvent (getDcFlushRequired (!!event->signalScope ))) {
175
+ compactEvent = event;
176
+ event = nullptr ;
177
+ } else {
178
+ NEO::GraphicsAllocation *eventAlloc = &event->getAllocation (this ->device );
179
+ commandContainer.addToResidencyContainer (eventAlloc);
180
+ bool flushRequired = !!event->signalScope &&
181
+ !launchParams.isKernelSplitOperation ;
182
+ l3FlushEnable = getDcFlushRequired (flushRequired);
183
+ isTimestampEvent = event->isUsingContextEndOffset ();
184
+ eventAddress = event->getPacketAddress (this ->device );
185
+ }
180
186
}
181
187
182
188
bool isKernelUsingSystemAllocation = false ;
@@ -249,6 +255,10 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
249
255
250
256
std::list<void *> additionalCommands;
251
257
258
+ if (compactEvent) {
259
+ appendEventForProfilingAllWalkers (compactEvent, true , true );
260
+ }
261
+
252
262
NEO::EncodeDispatchKernelArgs dispatchKernelArgs{
253
263
eventAddress, // eventAddress
254
264
neoDevice, // device
@@ -273,7 +283,9 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
273
283
NEO::EncodeDispatchKernel<GfxFamily>::encode (commandContainer, dispatchKernelArgs, getLogicalStateHelper ());
274
284
this ->containsStatelessUncachedResource = dispatchKernelArgs.requiresUncachedMocs ;
275
285
276
- if (event) {
286
+ if (compactEvent) {
287
+ appendEventForProfilingAllWalkers (compactEvent, false , true );
288
+ } else if (event) {
277
289
if (partitionCount > 1 ) {
278
290
event->setPacketsInUse (partitionCount);
279
291
}
@@ -404,7 +416,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelSplit(Kernel
404
416
Event *event,
405
417
const CmdListKernelLaunchParams &launchParams) {
406
418
if (event) {
407
- if (this -> pipeControlMultiKernelEventSync && launchParams.isKernelSplitOperation ) {
419
+ if (eventSignalPipeControl ( launchParams.isKernelSplitOperation , getDcFlushRequired (!!event-> signalScope )) ) {
408
420
event = nullptr ;
409
421
} else {
410
422
event->increaseKernelCount ();
0 commit comments