mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
fix: Reuse private allocations during cmdList dispatch
Related-To: NEO-8201 Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ba4867c3d0
commit
5807d512b3
@@ -389,6 +389,10 @@ void CommandStreamReceiver::cleanupResources() {
|
||||
getMemoryManager()->freeGraphicsMemory(globalStatelessHeapAllocation);
|
||||
globalStatelessHeapAllocation = nullptr;
|
||||
}
|
||||
for (auto &alloc : ownedPrivateAllocations) {
|
||||
getMemoryManager()->freeGraphicsMemory(alloc.second);
|
||||
}
|
||||
ownedPrivateAllocations.clear();
|
||||
}
|
||||
|
||||
WaitStatus CommandStreamReceiver::waitForCompletionWithTimeout(const WaitParams ¶ms, TaskCountType taskCountToWait) {
|
||||
@@ -567,6 +571,9 @@ ResidencyContainer &CommandStreamReceiver::getResidencyAllocations() {
|
||||
ResidencyContainer &CommandStreamReceiver::getEvictionAllocations() {
|
||||
return this->evictionAllocations;
|
||||
}
|
||||
std::unordered_map<uint32_t, GraphicsAllocation *> &CommandStreamReceiver::getOwnedPrivateAllocations() {
|
||||
return this->ownedPrivateAllocations;
|
||||
}
|
||||
|
||||
AubSubCaptureStatus CommandStreamReceiver::checkAndActivateAubSubCapture(const std::string &kernelName) { return {false, false}; }
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@ class CommandStreamReceiver {
|
||||
|
||||
ResidencyContainer &getResidencyAllocations();
|
||||
ResidencyContainer &getEvictionAllocations();
|
||||
std::unordered_map<uint32_t, GraphicsAllocation *> &getOwnedPrivateAllocations();
|
||||
|
||||
virtual GmmPageTableMngr *createPageTableManager() { return nullptr; }
|
||||
bool needsPageTableManager() const;
|
||||
@@ -460,6 +461,8 @@ class CommandStreamReceiver {
|
||||
|
||||
ResidencyContainer residencyAllocations;
|
||||
ResidencyContainer evictionAllocations;
|
||||
std::unordered_map<uint32_t, GraphicsAllocation *> ownedPrivateAllocations;
|
||||
|
||||
MutexType ownershipMutex;
|
||||
MutexType hostPtrSurfaceCreationMutex;
|
||||
ExecutionEnvironment &executionEnvironment;
|
||||
|
||||
Reference in New Issue
Block a user