mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 02:18:05 +08:00
feature: program in-order barrier as non stalling instruction
Related-To: NEO-7966 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c5d675570a
commit
f9a58b5544
@@ -2921,7 +2921,9 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendBarrier(ze_event_handle_
|
||||
|
||||
appendEventForProfiling(signalEvent, true);
|
||||
|
||||
if (isCopyOnly()) {
|
||||
if (this->inOrderExecutionEnabled) {
|
||||
appendSignalInOrderDependencyCounter();
|
||||
} else if (isCopyOnly()) {
|
||||
NEO::MiFlushArgs args{this->dummyBlitWa};
|
||||
uint64_t gpuAddress = 0u;
|
||||
TaskCountType value = 0u;
|
||||
|
||||
@@ -385,6 +385,23 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendBarrier(
|
||||
ze_event_handle_t *phWaitEvents) {
|
||||
ze_result_t ret = ZE_RESULT_SUCCESS;
|
||||
|
||||
if (isInOrderExecutionEnabled() && numWaitEvents == 0) {
|
||||
auto signalEvent = Event::fromHandle(hSignalEvent);
|
||||
bool earlyReturn = true;
|
||||
|
||||
if (signalEvent) {
|
||||
if (signalEvent->isEventTimestampFlagSet()) {
|
||||
earlyReturn = false;
|
||||
} else {
|
||||
signalEvent->enableInOrderExecMode(*this->inOrderDependencyCounterAllocation, this->inOrderDependencyCounter);
|
||||
}
|
||||
}
|
||||
|
||||
if (earlyReturn) {
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->isFlushTaskSubmissionEnabled) {
|
||||
checkAvailableSpace(numWaitEvents, false);
|
||||
checkWaitEventsState(numWaitEvents, phWaitEvents);
|
||||
|
||||
@@ -395,12 +395,6 @@ void CommandListCoreFamily<gfxCoreFamily>::appendComputeBarrierCommand() {
|
||||
uint64_t gpuWriteAddress = 0;
|
||||
uint64_t writeValue = 0;
|
||||
|
||||
if (this->inOrderExecutionEnabled) {
|
||||
postSyncMode = NEO::PostSyncMode::ImmediateData;
|
||||
gpuWriteAddress = this->inOrderDependencyCounterAllocation->getGpuAddress();
|
||||
writeValue = this->inOrderDependencyCounter + 1;
|
||||
}
|
||||
|
||||
NEO::MemorySynchronizationCommands<GfxFamily>::addSingleBarrier(*commandContainer.getCommandStream(), postSyncMode, gpuWriteAddress, writeValue, args);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user