Skip to content

Commit a18fb40

Browse files
Add resolves for SVM GPU allocations if aux translation is required
Related-To: NEO-5107 Signed-off-by: Milczarek, Slawomir <[email protected]>
1 parent 919b61b commit a18fb40

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

opencl/source/kernel/kernel.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2470,7 +2470,8 @@ void Kernel::fillWithKernelObjsForAuxTranslation(KernelObjsForAuxTranslation &ke
24702470
}
24712471
if (DebugManager.flags.EnableStatelessCompression.get()) {
24722472
for (auto gfxAllocation : kernelUnifiedMemoryGfxAllocations) {
2473-
if (gfxAllocation->getAllocationType() == GraphicsAllocation::AllocationType::BUFFER_COMPRESSED) {
2473+
if ((gfxAllocation->getAllocationType() == GraphicsAllocation::AllocationType::BUFFER_COMPRESSED) ||
2474+
(gfxAllocation->getAllocationType() == GraphicsAllocation::AllocationType::SVM_GPU)) {
24742475
kernelObjsForAuxTranslation.insert({KernelObjForAuxTranslation::Type::GFX_ALLOC, gfxAllocation});
24752476
auto &context = this->program->getContext();
24762477
if (context.isProvidingPerformanceHints()) {

opencl/test/unit_test/kernel/kernel_arg_buffer_tests.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,8 @@ TEST_F(KernelArgBufferTest, givenSetUnifiedMemoryExecInfoOnKernelWithIndirectSta
613613

614614
const auto allocationTypes = {GraphicsAllocation::AllocationType::BUFFER,
615615
GraphicsAllocation::AllocationType::BUFFER_COMPRESSED,
616-
GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY};
616+
GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY,
617+
GraphicsAllocation::AllocationType::SVM_GPU};
617618

618619
MockGraphicsAllocation gfxAllocation;
619620

@@ -625,7 +626,8 @@ TEST_F(KernelArgBufferTest, givenSetUnifiedMemoryExecInfoOnKernelWithIndirectSta
625626
KernelObjsForAuxTranslation kernelObjsForAuxTranslation;
626627
pKernel->fillWithKernelObjsForAuxTranslation(kernelObjsForAuxTranslation);
627628

628-
if (type == GraphicsAllocation::AllocationType::BUFFER_COMPRESSED) {
629+
if ((type == GraphicsAllocation::AllocationType::BUFFER_COMPRESSED) ||
630+
(type == GraphicsAllocation::AllocationType::SVM_GPU)) {
629631
EXPECT_EQ(1u, kernelObjsForAuxTranslation.size());
630632
auto kernelObj = *kernelObjsForAuxTranslation.find({KernelObjForAuxTranslation::Type::GFX_ALLOC, &gfxAllocation});
631633
EXPECT_NE(nullptr, kernelObj.object);

0 commit comments

Comments
 (0)