Add resolves for SVM GPU allocations if aux translation is required

Related-To: NEO-5107

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
Milczarek, Slawomir
2021-07-22 16:33:26 +00:00
committed by Compute-Runtime-Automation
parent 919b61b99e
commit a18fb402a0
2 changed files with 6 additions and 3 deletions

View File

@ -2470,7 +2470,8 @@ void Kernel::fillWithKernelObjsForAuxTranslation(KernelObjsForAuxTranslation &ke
}
if (DebugManager.flags.EnableStatelessCompression.get()) {
for (auto gfxAllocation : kernelUnifiedMemoryGfxAllocations) {
if (gfxAllocation->getAllocationType() == GraphicsAllocation::AllocationType::BUFFER_COMPRESSED) {
if ((gfxAllocation->getAllocationType() == GraphicsAllocation::AllocationType::BUFFER_COMPRESSED) ||
(gfxAllocation->getAllocationType() == GraphicsAllocation::AllocationType::SVM_GPU)) {
kernelObjsForAuxTranslation.insert({KernelObjForAuxTranslation::Type::GFX_ALLOC, gfxAllocation});
auto &context = this->program->getContext();
if (context.isProvidingPerformanceHints()) {

View File

@ -613,7 +613,8 @@ TEST_F(KernelArgBufferTest, givenSetUnifiedMemoryExecInfoOnKernelWithIndirectSta
const auto allocationTypes = {GraphicsAllocation::AllocationType::BUFFER,
GraphicsAllocation::AllocationType::BUFFER_COMPRESSED,
GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY};
GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY,
GraphicsAllocation::AllocationType::SVM_GPU};
MockGraphicsAllocation gfxAllocation;
@ -625,7 +626,8 @@ TEST_F(KernelArgBufferTest, givenSetUnifiedMemoryExecInfoOnKernelWithIndirectSta
KernelObjsForAuxTranslation kernelObjsForAuxTranslation;
pKernel->fillWithKernelObjsForAuxTranslation(kernelObjsForAuxTranslation);
if (type == GraphicsAllocation::AllocationType::BUFFER_COMPRESSED) {
if ((type == GraphicsAllocation::AllocationType::BUFFER_COMPRESSED) ||
(type == GraphicsAllocation::AllocationType::SVM_GPU)) {
EXPECT_EQ(1u, kernelObjsForAuxTranslation.size());
auto kernelObj = *kernelObjsForAuxTranslation.find({KernelObjForAuxTranslation::Type::GFX_ALLOC, &gfxAllocation});
EXPECT_NE(nullptr, kernelObj.object);