Add new debug key to control dependency resolution.

Currently only supported scenario is one in order queue.
Instead of resolving dependencies via semaphores, do this with pipe controls.

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2021-12-09 16:18:18 +00:00
committed by Compute-Runtime-Automation
parent 34d9d9b0d3
commit ebb16c8b74
7 changed files with 145 additions and 3 deletions

View File

@@ -324,6 +324,7 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
uint32_t peekBcsTaskCount(aub_stream::EngineType bcsEngineType) const;
void updateLatestSentEnqueueType(EnqueueProperties::Operation newEnqueueType) { this->latestSentEnqueueType = newEnqueueType; }
EnqueueProperties::Operation peekLatestSentEnqueueOperation() { return this->latestSentEnqueueType; }
void setupBarrierTimestampForBcsEngines(aub_stream::EngineType engineType, TimestampPacketDependencies &timestampPacketDependencies);
void processBarrierTimestampForBcsEngine(aub_stream::EngineType bcsEngineType, TimestampPacketDependencies &blitDependencies);

View File

@@ -106,7 +106,18 @@ void HardwareInterface<GfxFamily>::dispatchWalker(
mainKernel->areMultipleSubDevicesInContext());
}
TimestampPacketHelper::programCsrDependenciesForTimestampPacketContainer<GfxFamily>(*commandStream, csrDependencies);
bool programDependencies = true;
if (DebugManager.flags.ResolveDependenciesViaPipeControls.get() == 1) {
//only optimize kernel after kernel
if (commandQueue.peekLatestSentEnqueueOperation() == EnqueueProperties::Operation::GpuKernel) {
programDependencies = false;
}
}
if (programDependencies) {
TimestampPacketHelper::programCsrDependenciesForTimestampPacketContainer<GfxFamily>(*commandStream, csrDependencies);
}
dsh->align(EncodeStates<GfxFamily>::alignInterfaceDescriptorData);