mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
fix: add missing host ptr assignment increment
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6a3a90a83f
commit
8e51d9ae90
@@ -82,7 +82,8 @@ NEO::GraphicsAllocation *CommandList::getAllocationFromHostPtrMap(const void *bu
|
||||
auto allocation = this->csr->getInternalAllocationStorage()->obtainTemporaryAllocationWithPtr(bufferSize, buffer, NEO::AllocationType::EXTERNAL_HOST_PTR);
|
||||
if (allocation != nullptr) {
|
||||
auto alloc = allocation.get();
|
||||
this->csr->getInternalAllocationStorage()->storeAllocation(std::move(allocation), NEO::AllocationUsage::TEMPORARY_ALLOCATION);
|
||||
alloc->hostPtrTaskCountAssignment++;
|
||||
this->csr->getInternalAllocationStorage()->storeAllocationWithTaskCount(std::move(allocation), NEO::AllocationUsage::TEMPORARY_ALLOCATION, this->csr->peekTaskCount());
|
||||
return alloc;
|
||||
}
|
||||
}
|
||||
@@ -107,6 +108,7 @@ NEO::GraphicsAllocation *CommandList::getHostPtrAlloc(const void *buffer, uint64
|
||||
return nullptr;
|
||||
}
|
||||
if (this->storeExternalPtrAsTemporary()) {
|
||||
alloc->hostPtrTaskCountAssignment++;
|
||||
this->csr->getInternalAllocationStorage()->storeAllocationWithTaskCount(std::unique_ptr<NEO::GraphicsAllocation>(alloc), NEO::AllocationUsage::TEMPORARY_ALLOCATION, this->csr->peekTaskCount());
|
||||
} else if (alloc->getAllocationType() == NEO::AllocationType::EXTERNAL_HOST_PTR) {
|
||||
hostPtrMap.insert(std::make_pair(buffer, alloc));
|
||||
|
||||
@@ -335,6 +335,7 @@ void CommandQueueImp::handleIndirectAllocationResidency(UnifiedMemoryControls un
|
||||
|
||||
void CommandQueueImp::makeResidentAndMigrate(bool performMigration, const NEO::ResidencyContainer &residencyContainer) {
|
||||
for (auto alloc : residencyContainer) {
|
||||
alloc->prepareHostPtrForResidency(csr);
|
||||
csr->makeResident(*alloc);
|
||||
if (performMigration &&
|
||||
(alloc->getAllocationType() == NEO::AllocationType::SVM_GPU ||
|
||||
|
||||
Reference in New Issue
Block a user