mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
fix: Reset kernelWithAssertAppended flag
On new append calls, reset flag if previous submissions are completed. Related-To: NEO-16184 Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
cf35f8b40e
commit
9cccbcabe1
@@ -260,6 +260,7 @@ struct CommandListCoreFamilyImmediate : public CommandListCoreFamily<gfxCoreFami
|
||||
ze_result_t stagingStatusToL0(const NEO::StagingTransferStatus &status) const;
|
||||
size_t estimateAdditionalSizeAppendRegularCommandLists(uint32_t numCommandLists, ze_command_list_handle_t *phCommandLists);
|
||||
void setupFlagsForBcsSplit(CmdListMemoryCopyParams &memoryCopyParams, bool &hasStallingCmds, bool ©OffloadFlush, const void *srcPtr, void *dstPtr, size_t srcSize, size_t dstSize);
|
||||
void tryResetKernelWithAssertFlag();
|
||||
|
||||
MOCKABLE_VIRTUAL void checkAssert();
|
||||
ComputeFlushMethodType computeFlushMethod = nullptr;
|
||||
|
||||
@@ -547,12 +547,31 @@ bool CommandListCoreFamilyImmediate<gfxCoreFamily>::hasStallingCmdsForRelaxedOrd
|
||||
return (!relaxedOrderingDispatch && (numWaitEvents > 0 || this->hasInOrderDependencies()));
|
||||
}
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
void CommandListCoreFamilyImmediate<gfxCoreFamily>::tryResetKernelWithAssertFlag() {
|
||||
if (!this->kernelWithAssertAppended) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto cmdQueueImp = static_cast<CommandQueueImp *>(this->cmdQImmediate);
|
||||
auto csr = cmdQueueImp->getCsr();
|
||||
|
||||
auto submittedTaskCount = cmdQueueImp->getTaskCount();
|
||||
auto *tagAddress = csr->getTagAddress();
|
||||
|
||||
if (csr->testTaskCountReady(tagAddress, submittedTaskCount)) {
|
||||
this->kernelWithAssertAppended = false;
|
||||
}
|
||||
}
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendLaunchKernel(
|
||||
ze_kernel_handle_t kernelHandle, const ze_group_count_t &threadGroupDimensions,
|
||||
ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents,
|
||||
CmdListKernelLaunchParams &launchParams) {
|
||||
|
||||
tryResetKernelWithAssertFlag();
|
||||
|
||||
bool relaxedOrderingDispatch = isRelaxedOrderingDispatchAllowed(numWaitEvents, false);
|
||||
bool stallingCmdsForRelaxedOrdering = hasStallingCmdsForRelaxedOrdering(numWaitEvents, relaxedOrderingDispatch);
|
||||
|
||||
@@ -603,6 +622,8 @@ template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendLaunchKernelIndirect(
|
||||
ze_kernel_handle_t kernelHandle, const ze_group_count_t &pDispatchArgumentsBuffer,
|
||||
ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents, bool relaxedOrderingDispatch) {
|
||||
|
||||
tryResetKernelWithAssertFlag();
|
||||
relaxedOrderingDispatch = isRelaxedOrderingDispatchAllowed(numWaitEvents, false);
|
||||
|
||||
checkAvailableSpace(numWaitEvents, relaxedOrderingDispatch, commonImmediateCommandSize, false);
|
||||
|
||||
Reference in New Issue
Block a user