mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
Optimize Level Zero indirect allocations handling.
Make them resident directly instead of populating residency container Remove finds, not needed, CSR resolves duplicates at makeResident calls Observed gain is 32x for 10k indirect allocations. Co-authored-by: Michal Mrozek <michal.mrozek@intel.com> Co-authored-by: Dominik Dabek <dominik.dabek@intel.com> Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
513e6a2ee4
commit
3ecbc55ba9
@@ -252,6 +252,12 @@ class MockCsrHw2 : public CommandStreamReceiverHw<GfxFamily> {
|
||||
return taskCount;
|
||||
}
|
||||
|
||||
void makeSurfacePackNonResident(ResidencyContainer &allocationsForResidency) override {
|
||||
for (auto &surface : allocationsForResidency) {
|
||||
rememberedResidencies.push_back(surface);
|
||||
}
|
||||
CommandStreamReceiver::makeSurfacePackNonResident(allocationsForResidency);
|
||||
}
|
||||
void programHardwareContext(LinearStream &cmdStream) override {
|
||||
programHardwareContextCalled = true;
|
||||
}
|
||||
@@ -261,6 +267,7 @@ class MockCsrHw2 : public CommandStreamReceiverHw<GfxFamily> {
|
||||
std::unique_ptr<uint8_t> storedTaskStream;
|
||||
size_t storedTaskStreamSize = 0;
|
||||
|
||||
ResidencyContainer rememberedResidencies;
|
||||
int flushCalledCount = 0;
|
||||
std::unique_ptr<CommandBuffer> recordedCommandBuffer = nullptr;
|
||||
ResidencyContainer copyOfAllocations;
|
||||
|
||||
Reference in New Issue
Block a user