@@ -303,6 +303,8 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
303
303
bool inOrderNonWalkerSignalling = false ;
304
304
305
305
uint64_t inOrderCounterValue = 0 ;
306
+ uint64_t inOrderIncrementValue = 0 ;
307
+ uint64_t inOrderIncrementGpuAddress = 0 ;
306
308
NEO::InOrderExecInfo *inOrderExecInfo = nullptr ;
307
309
308
310
if (!launchParams.makeKernelCommandView ) {
@@ -327,8 +329,14 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
327
329
} else {
328
330
inOrderCounterValue = this ->inOrderExecInfo ->getCounterValue () + getInOrderIncrementValue ();
329
331
inOrderExecInfo = this ->inOrderExecInfo .get ();
330
- if (eventForInOrderExec && eventForInOrderExec->isCounterBased () && !isTimestampEvent) {
331
- eventAddress = 0 ;
332
+ if (eventForInOrderExec && eventForInOrderExec->isCounterBased ()) {
333
+ if (eventForInOrderExec->getInOrderIncrementValue () > 0 ) {
334
+ inOrderIncrementGpuAddress = eventForInOrderExec->getInOrderExecInfo ()->getBaseDeviceAddress ();
335
+ inOrderIncrementValue = eventForInOrderExec->getInOrderIncrementValue ();
336
+ }
337
+ if (!isTimestampEvent) {
338
+ eventAddress = 0 ;
339
+ }
332
340
}
333
341
}
334
342
}
@@ -338,46 +346,49 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
338
346
auto maxWgCountPerTile = kernel->getMaxWgCountPerTile (this ->engineGroupType );
339
347
340
348
NEO::EncodeKernelArgsExt dispatchKernelArgsExt = {};
349
+
341
350
NEO::EncodeDispatchKernelArgs dispatchKernelArgs{
342
- eventAddress, // eventAddress
343
- static_cast <uint64_t >(Event::STATE_SIGNALED), // postSyncImmValue
344
- inOrderCounterValue, // inOrderCounterValue
345
- neoDevice, // device
346
- inOrderExecInfo, // inOrderExecInfo
347
- kernel, // dispatchInterface
348
- ssh, // surfaceStateHeap
349
- dsh, // dynamicStateHeap
350
- reinterpret_cast <const void *>(&threadGroupDimensions), // threadGroupDimensions
351
- nullptr , // outWalkerPtr
352
- launchParams.cmdWalkerBuffer , // cpuWalkerBuffer
353
- launchParams.hostPayloadBuffer , // cpuPayloadBuffer
354
- nullptr , // outImplicitArgsPtr
355
- &additionalCommands, // additionalCommands
356
- &dispatchKernelArgsExt, // extendedArgs
357
- kernelPreemptionMode, // preemptionMode
358
- launchParams.requiredPartitionDim , // requiredPartitionDim
359
- launchParams.requiredDispatchWalkOrder , // requiredDispatchWalkOrder
360
- launchParams.localRegionSize , // localRegionSize
361
- this ->partitionCount , // partitionCount
362
- launchParams.reserveExtraPayloadSpace , // reserveExtraPayloadSpace
363
- maxWgCountPerTile, // maxWgCountPerTile
364
- this ->defaultPipelinedThreadArbitrationPolicy , // defaultPipelinedThreadArbitrationPolicy
365
- launchParams.isIndirect , // isIndirect
366
- launchParams.isPredicate , // isPredicate
367
- isTimestampEvent, // isTimestampEvent
368
- uncachedMocsKernel, // requiresUncachedMocs
369
- internalUsage, // isInternal
370
- launchParams.isCooperative , // isCooperative
371
- isHostSignalScopeEvent, // isHostScopeSignalEvent
372
- isKernelUsingSystemAllocation, // isKernelUsingSystemAllocation
373
- isImmediateType (), // isKernelDispatchedFromImmediateCmdList
374
- engineGroupType == NEO::EngineGroupType::renderCompute, // isRcs
375
- this ->dcFlushSupport , // dcFlushEnable
376
- this ->heaplessModeEnabled , // isHeaplessModeEnabled
377
- this ->heaplessStateInitEnabled , // isHeaplessStateInitEnabled
378
- interruptEvent, // interruptEvent
379
- !this ->scratchAddressPatchingEnabled , // immediateScratchAddressPatching
380
- launchParams.makeKernelCommandView // makeCommandView
351
+ .eventAddress = eventAddress,
352
+ .postSyncImmValue = static_cast <uint64_t >(Event::STATE_SIGNALED),
353
+ .inOrderCounterValue = inOrderCounterValue,
354
+ .inOrderIncrementGpuAddress = inOrderIncrementGpuAddress,
355
+ .inOrderIncrementValue = inOrderIncrementValue,
356
+ .device = neoDevice,
357
+ .inOrderExecInfo = inOrderExecInfo,
358
+ .dispatchInterface = kernel,
359
+ .surfaceStateHeap = ssh,
360
+ .dynamicStateHeap = dsh,
361
+ .threadGroupDimensions = reinterpret_cast <const void *>(&threadGroupDimensions),
362
+ .outWalkerPtr = nullptr ,
363
+ .cpuWalkerBuffer = launchParams.cmdWalkerBuffer ,
364
+ .cpuPayloadBuffer = launchParams.hostPayloadBuffer ,
365
+ .outImplicitArgsPtr = nullptr ,
366
+ .additionalCommands = &additionalCommands,
367
+ .extendedArgs = &dispatchKernelArgsExt,
368
+ .preemptionMode = kernelPreemptionMode,
369
+ .requiredPartitionDim = launchParams.requiredPartitionDim ,
370
+ .requiredDispatchWalkOrder = launchParams.requiredDispatchWalkOrder ,
371
+ .localRegionSize = launchParams.localRegionSize ,
372
+ .partitionCount = this ->partitionCount ,
373
+ .reserveExtraPayloadSpace = launchParams.reserveExtraPayloadSpace ,
374
+ .maxWgCountPerTile = maxWgCountPerTile,
375
+ .defaultPipelinedThreadArbitrationPolicy = this ->defaultPipelinedThreadArbitrationPolicy ,
376
+ .isIndirect = launchParams.isIndirect ,
377
+ .isPredicate = launchParams.isPredicate ,
378
+ .isTimestampEvent = isTimestampEvent,
379
+ .requiresUncachedMocs = uncachedMocsKernel,
380
+ .isInternal = internalUsage,
381
+ .isCooperative = launchParams.isCooperative ,
382
+ .isHostScopeSignalEvent = isHostSignalScopeEvent,
383
+ .isKernelUsingSystemAllocation = isKernelUsingSystemAllocation,
384
+ .isKernelDispatchedFromImmediateCmdList = isImmediateType (),
385
+ .isRcs = engineGroupType == NEO::EngineGroupType::renderCompute,
386
+ .dcFlushEnable = this ->dcFlushSupport ,
387
+ .isHeaplessModeEnabled = this ->heaplessModeEnabled ,
388
+ .isHeaplessStateInitEnabled = this ->heaplessStateInitEnabled ,
389
+ .interruptEvent = interruptEvent,
390
+ .immediateScratchAddressPatching = !this ->scratchAddressPatchingEnabled ,
391
+ .makeCommandView = launchParams.makeKernelCommandView ,
381
392
};
382
393
setAdditionalDispatchKernelArgsFromLaunchParams (dispatchKernelArgs, launchParams);
383
394
0 commit comments