fix: Use cmdlist residency container for reused private allocs

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2023-09-18 11:16:44 +00:00
committed by Compute-Runtime-Automation
parent 8f7b3e6699
commit ee21f7c717
4 changed files with 29 additions and 13 deletions

View File

@@ -927,11 +927,6 @@ void KernelImp::setInlineSamplers() {
}
}
void KernelImp::patchAndMoveToResidencyContainerPrivateSurface(NEO::GraphicsAllocation *alloc) {
this->patchCrossthreadDataWithPrivateAllocation(alloc);
this->residencyContainer.push_back(alloc);
}
ze_result_t KernelImp::initialize(const ze_kernel_desc_t *desc) {
this->kernelImmData = module->getKernelImmutableData(desc->pKernelName);
if (this->kernelImmData == nullptr) {
@@ -1042,7 +1037,8 @@ ze_result_t KernelImp::initialize(const ze_kernel_desc_t *desc) {
auto &kernelAttributes = kernelDescriptor.kernelAttributes;
if ((kernelAttributes.perHwThreadPrivateMemorySize != 0U) && (false == module->shouldAllocatePrivateMemoryPerDispatch())) {
this->privateMemoryGraphicsAllocation = allocatePrivateMemoryGraphicsAllocation();
this->patchAndMoveToResidencyContainerPrivateSurface(this->privateMemoryGraphicsAllocation);
this->patchCrossthreadDataWithPrivateAllocation(this->privateMemoryGraphicsAllocation);
this->residencyContainer.push_back(this->privateMemoryGraphicsAllocation);
}
this->createPrintfBuffer();

View File

@@ -90,8 +90,6 @@ struct KernelImp : Kernel {
void setInlineSamplers();
void patchAndMoveToResidencyContainerPrivateSurface(NEO::GraphicsAllocation *alloc);
ze_result_t initialize(const ze_kernel_desc_t *desc);
const uint8_t *getPerThreadData() const override { return perThreadDataForWholeThreadGroup; }