Add heap sharing to immediate command lists

This change is intended to be used in immediate command lists that are
using flush task functionality.
With this change all immediate command list using the same csr will consume
shared allocations for dsh and ssh heaps. This will decrease number of SBA
commands dispatched when multiple command lists coexists and dispatch kernels.
With this change new SBA command should be dispatched only when current heap
allocation is exhausted.
Functionality is currently disabled and available under debug key.
Functionality will be enabled by default for all immediate command lists
with flush task functionality enabled.

Related-To: NEO-7142

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2022-09-26 22:28:10 +00:00
committed by Compute-Runtime-Automation
parent 71bef6094d
commit 3d92186362
35 changed files with 671 additions and 93 deletions

View File

@ -140,6 +140,10 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
}
void initializeDeviceWithFirstSubmission() override;
HeapDirtyState &getSshState() {
return sshState;
}
protected:
void programPreemption(LinearStream &csr, DispatchFlags &dispatchFlags);
void programL3(LinearStream &csr, uint32_t &newL3Config);

View File

@ -342,7 +342,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
if (stallingCommandsOnNextFlushRequired) {
programStallingCommandsForBarrier(commandStreamCSR, dispatchFlags);
}
const bool hasDsh = hwInfo.capabilityTable.supportsImages;
const bool hasDsh = hwInfo.capabilityTable.supportsImages && dsh != nullptr;
bool dshDirty = hasDsh ? dshState.updateAndCheck(dsh) : false;
bool iohDirty = iohState.updateAndCheck(ioh);
bool sshDirty = sshState.updateAndCheck(ssh);