diff --git a/level_zero/core/test/unit_tests/sources/kernel/test_kernel.cpp b/level_zero/core/test/unit_tests/sources/kernel/test_kernel.cpp index 7078fe17c9..d9d9a4819f 100644 --- a/level_zero/core/test/unit_tests/sources/kernel/test_kernel.cpp +++ b/level_zero/core/test/unit_tests/sources/kernel/test_kernel.cpp @@ -803,7 +803,7 @@ TEST_F(KernelImmutableDataTests, givenInternalModuleWhenKernelIsCreatedThenIsaIs bool isInternal = true; std::unique_ptr mockKernelImmData = std::make_unique(perHwThreadPrivateMemorySizeRequested); - mockKernelImmData->getIsaGraphicsAllocation()->setAllocationType(AllocationType::kernelIsaInternal, device->getProductHelper()); + mockKernelImmData->getIsaGraphicsAllocation()->setAllocationType(AllocationType::kernelIsaInternal); size_t previouscopyMemoryToAllocationCalledTimes = mockMemoryManager->copyMemoryToAllocationCalledTimes; @@ -878,7 +878,7 @@ TEST_P(KernelIsaCopyingMomentTest, givenInternalModuleWhenKernelIsCreatedThenIsa kernelMock.immutableData.kernelInfo = kernelInfo; kernelMock.immutableData.surfaceStateHeapSize = 64; kernelMock.immutableData.surfaceStateHeapTemplate.reset(new uint8_t[64]); - kernelMock.immutableData.getIsaGraphicsAllocation()->setAllocationType(AllocationType::kernelIsaInternal, device->getProductHelper()); + kernelMock.immutableData.getIsaGraphicsAllocation()->setAllocationType(AllocationType::kernelIsaInternal); kernelInfo->kernelDescriptor.payloadMappings.implicitArgs.systemThreadSurfaceAddress.bindful = 0; moduleMock->translationUnit->programInfo.kernelInfos.push_back(kernelInfo); diff --git a/opencl/source/mem_obj/buffer.cpp b/opencl/source/mem_obj/buffer.cpp index ab675eb8aa..caa0c9c2b7 100644 --- a/opencl/source/mem_obj/buffer.cpp +++ b/opencl/source/mem_obj/buffer.cpp @@ -476,7 +476,7 @@ Buffer *Buffer::create(Context *context, allocationInfo.allocationType = AllocationType::bufferHostMemory; } - allocationInfo.memory->setAllocationType(allocationInfo.allocationType, defaultDevice->getProductHelper()); + allocationInfo.memory->setAllocationType(allocationInfo.allocationType); auto isWritable = !(memoryProperties.flags.readOnly || memoryProperties.flags.hostReadOnly || memoryProperties.flags.hostNoAccess); allocationInfo.memory->setMemObjectsAllocationWithWritableFlags(isWritable); diff --git a/opencl/source/mem_obj/image.cpp b/opencl/source/mem_obj/image.cpp index 12cb46e15c..00262c0c4e 100644 --- a/opencl/source/mem_obj/image.cpp +++ b/opencl/source/mem_obj/image.cpp @@ -268,7 +268,7 @@ Image *Image::create(Context *context, } if (parentBuffer == nullptr) { - allocationInfo.memory->setAllocationType(AllocationType::image, defaultDevice->getProductHelper()); + allocationInfo.memory->setAllocationType(AllocationType::image); } if (parentImage) { diff --git a/opencl/test/unit_test/aub_tests/command_queue/compression_aub_tests_xehp_and_later.cpp b/opencl/test/unit_test/aub_tests/command_queue/compression_aub_tests_xehp_and_later.cpp index 6c35b221d6..4f85aaad4e 100644 --- a/opencl/test/unit_test/aub_tests/command_queue/compression_aub_tests_xehp_and_later.cpp +++ b/opencl/test/unit_test/aub_tests/command_queue/compression_aub_tests_xehp_and_later.cpp @@ -99,7 +99,7 @@ void CompressionXeHPAndLater::givenCompressedBuffersWhenWriting auto notCompressedBuffer = std::unique_ptr(Buffer::create(context, CL_MEM_READ_WRITE, bufferSize, nullptr, retVal)); auto nonCompressedAllocation = notCompressedBuffer->getGraphicsAllocation(device->getRootDeviceIndex()); - nonCompressedAllocation->setAllocationType(AllocationType::buffer, device->getProductHelper()); + nonCompressedAllocation->setAllocationType(AllocationType::buffer); if (nonCompressedAllocation->getDefaultGmm()) { nonCompressedAllocation->getDefaultGmm()->setCompressionEnabled(false); } diff --git a/opencl/test/unit_test/aub_tests/fixtures/aub_fixture.cpp b/opencl/test/unit_test/aub_tests/fixtures/aub_fixture.cpp index e59bdf1132..8ebde04223 100644 --- a/opencl/test/unit_test/aub_tests/fixtures/aub_fixture.cpp +++ b/opencl/test/unit_test/aub_tests/fixtures/aub_fixture.cpp @@ -18,7 +18,7 @@ GraphicsAllocation *AUBFixture::createHostPtrAllocationFromSvmPtr(void *svmPtr, GraphicsAllocation *allocation = csr->getMemoryManager()->allocateGraphicsMemoryWithProperties(MockAllocationProperties{csr->getRootDeviceIndex(), false, size}, svmPtr); csr->makeResidentHostPtrAllocation(allocation); csr->getInternalAllocationStorage()->storeAllocation(std::unique_ptr(allocation), TEMPORARY_ALLOCATION); - allocation->setAllocationType(AllocationType::buffer, csr->getProductHelper()); + allocation->setAllocationType(AllocationType::buffer); allocation->setMemObjectsAllocationWithWritableFlags(true); return allocation; } diff --git a/opencl/test/unit_test/aub_tests/fixtures/simple_arg_fixture.h b/opencl/test/unit_test/aub_tests/fixtures/simple_arg_fixture.h index b2e8992e0f..66f2ac9943 100644 --- a/opencl/test/unit_test/aub_tests/fixtures/simple_arg_fixture.h +++ b/opencl/test/unit_test/aub_tests/fixtures/simple_arg_fixture.h @@ -73,7 +73,7 @@ struct SimpleArgFixture : public FixtureFactory::IndirectHeapFixture, outBuffer = AUBCommandStreamFixture::createResidentAllocationAndStoreItInCsr(pDestMemory, sizeUserMemory); ASSERT_NE(nullptr, outBuffer); - outBuffer->setAllocationType(AllocationType::buffer, pClDevice->getProductHelper()); + outBuffer->setAllocationType(AllocationType::buffer); outBuffer->setMemObjectsAllocationWithWritableFlags(true); } diff --git a/opencl/test/unit_test/built_ins/built_in_tests.cpp b/opencl/test/unit_test/built_ins/built_in_tests.cpp index 6633bcb08c..4297f933ae 100644 --- a/opencl/test/unit_test/built_ins/built_in_tests.cpp +++ b/opencl/test/unit_test/built_ins/built_in_tests.cpp @@ -289,9 +289,9 @@ TEST_F(BuiltInTests, GivenCopyBufferToSystemMemoryBufferWhenDispatchInfoIsCreate MockBuffer &src = *srcPtr; MockBuffer &dst = *dstPtr; - auto &productHelper = pDevice->getProductHelper(); - srcPtr->mockGfxAllocation.setAllocationType(AllocationType::buffer, productHelper); - dstPtr->mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory, productHelper); + + srcPtr->mockGfxAllocation.setAllocationType(AllocationType::buffer); + dstPtr->mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory); BuiltinOpParams builtinOpsParams; @@ -356,9 +356,9 @@ TEST_F(BuiltInTests, GivenCopyBufferToLocalMemoryBufferWhenDispatchInfoIsCreated MockBuffer &src = *srcPtr; MockBuffer &dst = *dstPtr; - auto &productHelper = pDevice->getProductHelper(); - srcPtr->mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory, productHelper); - dstPtr->mockGfxAllocation.setAllocationType(AllocationType::buffer, productHelper); + + srcPtr->mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory); + dstPtr->mockGfxAllocation.setAllocationType(AllocationType::buffer); BuiltinOpParams builtinOpsParams; @@ -922,9 +922,9 @@ TEST_F(BuiltInTests, givenBigOffsetAndSizeWhenBuilderCopyBufferToSystemBufferRec srcBuffer.size = static_cast(bigSize); MockBuffer dstBuffer; dstBuffer.size = static_cast(bigSize); - auto &productHelper = pDevice->getProductHelper(); - srcBuffer.mockGfxAllocation.setAllocationType(AllocationType::buffer, productHelper); - dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory, productHelper); + + srcBuffer.mockGfxAllocation.setAllocationType(AllocationType::buffer); + dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory); BuiltinOpParams dc; dc.srcMemObj = &srcBuffer; @@ -963,9 +963,8 @@ TEST_F(BuiltInTests, givenBigOffsetAndSizeWhenBuilderCopyBufferToLocalBufferRect MockBuffer dstBuffer; dstBuffer.size = static_cast(bigSize); - auto &productHelper = pDevice->getProductHelper(); - srcBuffer.mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory, productHelper); - dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::buffer, productHelper); + srcBuffer.mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory); + dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::buffer); BuiltinOpParams dc; dc.srcMemObj = &srcBuffer; @@ -1004,9 +1003,8 @@ TEST_F(BuiltInTests, givenBigOffsetAndSizeWhenBuilderFillSystemBufferStatelessIs MockBuffer dstBuffer; dstBuffer.size = static_cast(bigSize); - auto &productHelper = pDevice->getProductHelper(); - srcBuffer.mockGfxAllocation.setAllocationType(AllocationType::buffer, productHelper); - dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory, productHelper); + srcBuffer.mockGfxAllocation.setAllocationType(AllocationType::buffer); + dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory); BuiltinOpParams dc; dc.srcMemObj = &srcBuffer; @@ -1040,9 +1038,8 @@ TEST_F(BuiltInTests, givenBigOffsetAndSizeWhenBuilderFillLocalBufferStatelessIsU MockBuffer dstBuffer; dstBuffer.size = static_cast(bigSize); - auto &productHelper = pDevice->getProductHelper(); - srcBuffer.mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory, productHelper); - dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::buffer, productHelper); + srcBuffer.mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory); + dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::buffer); BuiltinOpParams dc; dc.srcMemObj = &srcBuffer; @@ -1104,7 +1101,7 @@ HWTEST_F(BuiltInTests, givenBigOffsetAndSizeWhenBuilderCopyImageToSystemBufferSt MockBuffer dstBuffer; dstBuffer.size = static_cast(bigSize); - dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory, pDevice->getProductHelper()); + dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory); std ::unique_ptr pSrcImage(Image2dHelper<>::create(pContext)); ASSERT_NE(nullptr, pSrcImage.get()); @@ -1142,7 +1139,7 @@ HWTEST_F(BuiltInTests, givenBigOffsetAndSizeWhenBuilderCopyImageToLocalBufferSta MockBuffer dstBuffer; dstBuffer.size = static_cast(bigSize); - dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::buffer, pDevice->getProductHelper()); + dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::buffer); std ::unique_ptr pSrcImage(Image2dHelper<>::create(pContext)); ASSERT_NE(nullptr, pSrcImage.get()); @@ -2471,9 +2468,8 @@ HWTEST2_F(BuiltInTests, whenBuilderCopyBufferToSystemBufferRectStatelessHeapless MockBuffer dstBuffer; dstBuffer.size = static_cast(bigSize); - const auto &productHelper = pDevice->getRootDeviceEnvironment().getHelper(); - srcBuffer.mockGfxAllocation.setAllocationType(AllocationType::buffer, productHelper); - dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory, productHelper); + srcBuffer.mockGfxAllocation.setAllocationType(AllocationType::buffer); + dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory); BuiltinOpParams dc; dc.srcMemObj = &srcBuffer; @@ -2511,9 +2507,9 @@ HWTEST2_F(BuiltInTests, whenBuilderCopyBufferToLocalBufferRectStatelessHeaplessI srcBuffer.size = static_cast(bigSize); MockBuffer dstBuffer; dstBuffer.size = static_cast(bigSize); - const auto &productHelper = pDevice->getRootDeviceEnvironment().getHelper(); - srcBuffer.mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory, productHelper); - dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::buffer, productHelper); + + srcBuffer.mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory); + dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::buffer); BuiltinOpParams dc; dc.srcMemObj = &srcBuffer; @@ -2551,9 +2547,9 @@ HWTEST2_F(BuiltInTests, whenBuilderFillSystemBufferStatelessHeaplessIsUsedThenPa srcBuffer.size = static_cast(bigSize); MockBuffer dstBuffer; dstBuffer.size = static_cast(bigSize); - const auto &productHelper = pDevice->getRootDeviceEnvironment().getHelper(); - srcBuffer.mockGfxAllocation.setAllocationType(AllocationType::buffer, productHelper); - dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory, productHelper); + + srcBuffer.mockGfxAllocation.setAllocationType(AllocationType::buffer); + dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory); BuiltinOpParams dc; dc.srcMemObj = &srcBuffer; @@ -2586,9 +2582,9 @@ HWTEST2_F(BuiltInTests, whenBuilderFillLocalBufferStatelessHeaplessIsUsedThenPar srcBuffer.size = static_cast(bigSize); MockBuffer dstBuffer; dstBuffer.size = static_cast(bigSize); - const auto &productHelper = pDevice->getRootDeviceEnvironment().getHelper(); - srcBuffer.mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory, productHelper); - dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::buffer, productHelper); + + srcBuffer.mockGfxAllocation.setAllocationType(AllocationType::bufferHostMemory); + dstBuffer.mockGfxAllocation.setAllocationType(AllocationType::buffer); BuiltinOpParams dc; dc.srcMemObj = &srcBuffer; diff --git a/opencl/test/unit_test/command_queue/blit_enqueue_fixture.h b/opencl/test/unit_test/command_queue/blit_enqueue_fixture.h index 4db7409097..2631a51b7f 100644 --- a/opencl/test/unit_test/command_queue/blit_enqueue_fixture.h +++ b/opencl/test/unit_test/command_queue/blit_enqueue_fixture.h @@ -164,7 +164,7 @@ struct BlitEnqueueTests : public ::testing::Test { } void setAllocationType(GraphicsAllocation *graphicsAllocation, bool compressed) { - graphicsAllocation->setAllocationType(AllocationType::buffer, device->getProductHelper()); + graphicsAllocation->setAllocationType(AllocationType::buffer); if (compressed && !graphicsAllocation->getDefaultGmm()) { auto gmmHelper = device->getRootDeviceEnvironment().getGmmHelper(); diff --git a/opencl/test/unit_test/command_queue/command_queue_hw_1_tests.cpp b/opencl/test/unit_test/command_queue/command_queue_hw_1_tests.cpp index 3a8dbb65ac..84deb6d129 100644 --- a/opencl/test/unit_test/command_queue/command_queue_hw_1_tests.cpp +++ b/opencl/test/unit_test/command_queue/command_queue_hw_1_tests.cpp @@ -1442,7 +1442,7 @@ HWTEST_F(CommandQueueHwTest, givenDirectSubmissionAndSharedDisplayableImageWhenR auto image = std::unique_ptr(ImageHelper::create(context)); image->setSharingHandler(mockSharingHandler); - image->getGraphicsAllocation(0u)->setAllocationType(AllocationType::sharedImage, pClDevice->getProductHelper()); + image->getGraphicsAllocation(0u)->setAllocationType(AllocationType::sharedImage); cl_mem memObject = image.get(); cl_uint numObjects = 1; diff --git a/opencl/test/unit_test/command_queue/command_queue_tests.cpp b/opencl/test/unit_test/command_queue/command_queue_tests.cpp index deeff1c806..f1bf58fc81 100644 --- a/opencl/test/unit_test/command_queue/command_queue_tests.cpp +++ b/opencl/test/unit_test/command_queue/command_queue_tests.cpp @@ -1321,7 +1321,7 @@ HWTEST_F(CommandQueueTests, givenEnqueuesForSharedObjectsWithImageWhenUsingShari auto image = std::unique_ptr(ImageHelper::create(&context)); image->setSharingHandler(mockSharingHandler); - image->getGraphicsAllocation(0u)->setAllocationType(AllocationType::sharedImage, context.getDevice(0)->getProductHelper()); + image->getGraphicsAllocation(0u)->setAllocationType(AllocationType::sharedImage); cl_mem memObject = image.get(); cl_uint numObjects = 1; @@ -1345,7 +1345,7 @@ HWTEST_F(CommandQueueTests, givenDirectSubmissionAndSharedImageWhenReleasingShar auto image = std::unique_ptr(ImageHelper::create(&context)); image->setSharingHandler(mockSharingHandler); - image->getGraphicsAllocation(0u)->setAllocationType(AllocationType::sharedImage, context.getDevice(0)->getProductHelper()); + image->getGraphicsAllocation(0u)->setAllocationType(AllocationType::sharedImage); cl_mem memObject = image.get(); cl_uint numObjects = 1; @@ -1376,7 +1376,7 @@ HWTEST_F(CommandQueueTests, givenDcFlushMitigationAndDirectSubmissionAndBufferWh auto buffer = std::unique_ptr(BufferHelper<>::create(&context)); buffer->setSharingHandler(mockSharingHandler); - buffer->getGraphicsAllocation(0u)->setAllocationType(AllocationType::sharedBuffer, context.getDevice(0)->getProductHelper()); + buffer->getGraphicsAllocation(0u)->setAllocationType(AllocationType::sharedBuffer); cl_mem memObject = buffer.get(); cl_uint numObjects = 1; diff --git a/opencl/test/unit_test/command_queue/enqueue_svm_mem_copy_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_svm_mem_copy_tests.cpp index 4077ed64c6..20783745d0 100644 --- a/opencl/test/unit_test/command_queue/enqueue_svm_mem_copy_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_svm_mem_copy_tests.cpp @@ -517,9 +517,8 @@ HWTEST_F(EnqueueSvmMemCopyTest, givenEnqueueSvmMemcpyWhenSvmZeroCopyThenBuiltinK std::unique_ptr(new MockBuiltinDispatchInfoBuilder(*builtIns, pCmdQ->getClDevice(), &origBuilder))); EXPECT_EQ(&origBuilder, oldBuilder.get()); - auto &productHelper = pDevice->getProductHelper(); - srcSvmAlloc->setAllocationType(NEO::AllocationType::svmZeroCopy, productHelper); - dstSvmAlloc->setAllocationType(NEO::AllocationType::svmZeroCopy, productHelper); + srcSvmAlloc->setAllocationType(NEO::AllocationType::svmZeroCopy); + dstSvmAlloc->setAllocationType(NEO::AllocationType::svmZeroCopy); // call enqueue on mock builder auto retVal = pCmdQ->enqueueSVMMemcpy( @@ -595,9 +594,8 @@ HWTEST_F(EnqueueSvmMemCopyTest, givenEnqueueSvmMemcpyWhenSvmGpuThenBuiltinKernel std::unique_ptr(new MockBuiltinDispatchInfoBuilder(*builtIns, pCmdQ->getClDevice(), &origBuilder))); EXPECT_EQ(&origBuilder, oldBuilder.get()); - auto &productHelper = pDevice->getProductHelper(); - srcSvmAlloc->setAllocationType(NEO::AllocationType::svmGpu, productHelper); - dstSvmAlloc->setAllocationType(NEO::AllocationType::svmGpu, productHelper); + srcSvmAlloc->setAllocationType(NEO::AllocationType::svmGpu); + dstSvmAlloc->setAllocationType(NEO::AllocationType::svmGpu); // call enqueue on mock builder auto retVal = pCmdQ->enqueueSVMMemcpy( diff --git a/opencl/test/unit_test/command_queue/enqueue_svm_mem_fill_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_svm_mem_fill_tests.cpp index deb256b6d7..4b07ee2990 100644 --- a/opencl/test/unit_test/command_queue/enqueue_svm_mem_fill_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_svm_mem_fill_tests.cpp @@ -275,9 +275,7 @@ HWTEST_F(EnqueueSvmMemFillHwTest, givenEnqueueSVMMemFillWhenUsingCopyBufferToSys auto cmdQ = std::make_unique>(context.get(), device.get()); auto svmData = context->getSVMAllocsManager()->getSVMAlloc(svmPtr); svmData->size = static_cast(bigSize); - - auto &productHelper = device->getProductHelper(); - svmData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex())->setAllocationType(AllocationType::svmZeroCopy, productHelper); + svmData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex())->setAllocationType(AllocationType::svmZeroCopy); cmdQ->validateKernelSystemMemory = true; cmdQ->expectedKernelSystemMemory = true; @@ -300,8 +298,7 @@ HWTEST_F(EnqueueSvmMemFillHwTest, givenEnqueueSVMMemFillWhenUsingCopyBufferToLoc GTEST_SKIP(); } auto svmData = context->getSVMAllocsManager()->getSVMAlloc(svmPtr); - auto &productHelper = device->getProductHelper(); - svmData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex())->setAllocationType(AllocationType::svmGpu, productHelper); + svmData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex())->setAllocationType(AllocationType::svmGpu); cmdQ->validateKernelSystemMemory = true; cmdQ->expectedKernelSystemMemory = false; diff --git a/opencl/test/unit_test/gen12lp/buffer_tests_gen12lp.inl b/opencl/test/unit_test/gen12lp/buffer_tests_gen12lp.inl index e0f9f2b615..25aeddf6e4 100644 --- a/opencl/test/unit_test/gen12lp/buffer_tests_gen12lp.inl +++ b/opencl/test/unit_test/gen12lp/buffer_tests_gen12lp.inl @@ -75,8 +75,7 @@ GEN12LPTEST_F(BufferTestsTgllp, givenConstantSurfaceWhenProgrammingSurfaceStateT nullptr, retVal)); ASSERT_EQ(CL_SUCCESS, retVal); - auto &productHelper = device->getProductHelper(); - buffer->getGraphicsAllocation(0)->setAllocationType(AllocationType::constantSurface, productHelper); + buffer->getGraphicsAllocation(0)->setAllocationType(AllocationType::constantSurface); typename FamilyType::RENDER_SURFACE_STATE surfaceState = {}; buffer->setArgStateful(&surfaceState, false, false, false, false, context->getDevice(0)->getDevice(), false); diff --git a/opencl/test/unit_test/gen12lp/gfx_core_helper_tests_gen12lp.inl b/opencl/test/unit_test/gen12lp/gfx_core_helper_tests_gen12lp.inl index 3ae6302d16..db0a8e50ab 100644 --- a/opencl/test/unit_test/gen12lp/gfx_core_helper_tests_gen12lp.inl +++ b/opencl/test/unit_test/gen12lp/gfx_core_helper_tests_gen12lp.inl @@ -275,8 +275,7 @@ GEN12LPTEST_F(GfxCoreHelperTestsGen12LpBuffer, givenBufferThenCheckResourceCompa buffer.reset(Buffer::create(context.get(), 0, MemoryConstants::cacheLineSize, nullptr, retVal)); - auto &productHelper = device->getProductHelper(); - buffer->getGraphicsAllocation(rootDeviceIndex)->setAllocationType(AllocationType::buffer, productHelper); + buffer->getGraphicsAllocation(rootDeviceIndex)->setAllocationType(AllocationType::buffer); EXPECT_TRUE(gfxCoreHelper.checkResourceCompatibility(*buffer->getGraphicsAllocation(rootDeviceIndex))); } diff --git a/opencl/test/unit_test/kernel/kernel_arg_buffer_tests.cpp b/opencl/test/unit_test/kernel/kernel_arg_buffer_tests.cpp index f9debf7263..48255a6963 100644 --- a/opencl/test/unit_test/kernel/kernel_arg_buffer_tests.cpp +++ b/opencl/test/unit_test/kernel/kernel_arg_buffer_tests.cpp @@ -206,8 +206,7 @@ TEST_F(KernelArgBufferTest, given32BitDeviceWhenArgPassedIsNullThenOnly4BytesAre TEST_F(KernelArgBufferTest, givenBufferWhenHasDirectStatelessAccessToHostMemoryIsCalledThenReturnFalse) { MockBuffer buffer; - auto &productHelper = pClDevice->getProductHelper(); - buffer.getGraphicsAllocation(mockRootDeviceIndex)->setAllocationType(AllocationType::buffer, productHelper); + buffer.getGraphicsAllocation(mockRootDeviceIndex)->setAllocationType(AllocationType::buffer); auto val = (cl_mem)&buffer; auto pVal = &val; @@ -224,8 +223,7 @@ TEST_F(KernelArgBufferTest, givenBufferWhenHasDirectStatelessAccessToHostMemoryI TEST_F(KernelArgBufferTest, givenSharedBufferWhenHasDirectStatelessAccessToSharedBufferIsCalledThenReturnCorrectValue) { MockBuffer buffer; - auto &productHelper = pClDevice->getProductHelper(); - buffer.getGraphicsAllocation(mockRootDeviceIndex)->setAllocationType(AllocationType::sharedBuffer, productHelper); + buffer.getGraphicsAllocation(mockRootDeviceIndex)->setAllocationType(AllocationType::sharedBuffer); auto val = (cl_mem)&buffer; auto pVal = &val; @@ -242,8 +240,7 @@ TEST_F(KernelArgBufferTest, givenSharedBufferWhenHasDirectStatelessAccessToShare TEST_F(KernelArgBufferTest, givenBufferInHostMemoryWhenHasDirectStatelessAccessToHostMemoryIsCalledThenReturnCorrectValue) { MockBuffer buffer; - auto &productHelper = pClDevice->getProductHelper(); - buffer.getGraphicsAllocation(mockRootDeviceIndex)->setAllocationType(AllocationType::bufferHostMemory, productHelper); + buffer.getGraphicsAllocation(mockRootDeviceIndex)->setAllocationType(AllocationType::bufferHostMemory); auto val = (cl_mem)&buffer; auto pVal = &val; @@ -267,8 +264,7 @@ TEST_F(KernelArgBufferTest, givenGfxAllocationWhenHasDirectStatelessAccessToHost char data[128]; void *ptr = &data; MockGraphicsAllocation gfxAllocation(ptr, 128); - auto &productHelper = pClDevice->getProductHelper(); - gfxAllocation.setAllocationType(AllocationType::buffer, productHelper); + gfxAllocation.setAllocationType(AllocationType::buffer); for (auto pureStatefulBufferAccess : {false, true}) { pKernelInfo->setBufferStateful(0, pureStatefulBufferAccess); @@ -289,8 +285,7 @@ TEST_F(KernelArgBufferTest, givenGfxAllocationInHostMemoryWhenHasDirectStateless char data[128]; void *ptr = &data; MockGraphicsAllocation gfxAllocation(ptr, 128); - auto &productHelper = pClDevice->getProductHelper(); - gfxAllocation.setAllocationType(AllocationType::bufferHostMemory, productHelper); + gfxAllocation.setAllocationType(AllocationType::bufferHostMemory); for (auto pureStatefulBufferAccess : {false, true}) { pKernelInfo->setBufferStateful(0, pureStatefulBufferAccess); @@ -334,9 +329,8 @@ TEST_F(KernelArgBufferTest, givenKernelWithIndirectStatelessAccessWhenHasIndirec MockKernel kernelWithIndirectUnifiedMemoryAllocation(pProgram, kernelInfo, *pClDevice); MockGraphicsAllocation gfxAllocation; - auto &productHelper = pClDevice->getProductHelper(); for (const auto type : allocationTypes) { - gfxAllocation.setAllocationType(type, productHelper); + gfxAllocation.setAllocationType(type); kernelWithIndirectUnifiedMemoryAllocation.setUnifiedMemoryExecInfo(&gfxAllocation); if (type == AllocationType::bufferHostMemory) { EXPECT_TRUE(kernelWithIndirectUnifiedMemoryAllocation.hasIndirectStatelessAccessToHostMemory()); @@ -391,8 +385,7 @@ TEST_F(KernelArgBufferTest, givenSetArgBufferOnKernelWithDirectStatelessAccessTo debugManager.flags.EnableStatelessCompression.set(1); MockBuffer buffer; - auto &productHelper = pClDevice->getProductHelper(); - buffer.getGraphicsAllocation(mockRootDeviceIndex)->setAllocationType(AllocationType::sharedBuffer, productHelper); + buffer.getGraphicsAllocation(mockRootDeviceIndex)->setAllocationType(AllocationType::sharedBuffer); auto val = (cl_mem)&buffer; auto pVal = &val; @@ -414,8 +407,7 @@ TEST_F(KernelArgBufferTest, givenSetArgBufferOnKernelWithDirectStatelessAccessTo debugManager.flags.EnableStatelessCompression.set(1); MockBuffer buffer; - auto &productHelper = pClDevice->getProductHelper(); - buffer.getGraphicsAllocation(mockRootDeviceIndex)->setAllocationType(AllocationType::bufferHostMemory, productHelper); + buffer.getGraphicsAllocation(mockRootDeviceIndex)->setAllocationType(AllocationType::bufferHostMemory); auto val = (cl_mem)&buffer; auto pVal = &val; @@ -465,8 +457,7 @@ TEST_F(KernelArgBufferTest, givenSetArgSvmAllocOnKernelWithDirectStatelessAccess char data[128]; void *ptr = &data; MockGraphicsAllocation gfxAllocation(ptr, 128); - auto &productHelper = pClDevice->getProductHelper(); - gfxAllocation.setAllocationType(AllocationType::bufferHostMemory, productHelper); + gfxAllocation.setAllocationType(AllocationType::bufferHostMemory); auto retVal = pKernel->setArgSvmAlloc(0, ptr, &gfxAllocation, 0u); EXPECT_EQ(CL_SUCCESS, retVal); @@ -512,8 +503,7 @@ TEST_F(KernelArgBufferTest, givenSetUnifiedMemoryExecInfoOnKernelWithNoIndirectS pKernelInfo->kernelDescriptor.kernelAttributes.hasIndirectStatelessAccess = false; MockGraphicsAllocation gfxAllocation; - auto &productHelper = pClDevice->getProductHelper(); - gfxAllocation.setAllocationType(AllocationType::bufferHostMemory, productHelper); + gfxAllocation.setAllocationType(AllocationType::bufferHostMemory); pKernel->setUnifiedMemoryExecInfo(&gfxAllocation); @@ -536,9 +526,9 @@ TEST_F(KernelArgBufferTest, givenSetUnifiedMemoryExecInfoOnKernelWithIndirectSta AllocationType::bufferHostMemory}; MockGraphicsAllocation gfxAllocation; - auto &productHelper = pClDevice->getProductHelper(); + for (const auto type : allocationTypes) { - gfxAllocation.setAllocationType(type, productHelper); + gfxAllocation.setAllocationType(type); pKernel->setUnifiedMemoryExecInfo(&gfxAllocation); @@ -579,9 +569,9 @@ TEST_F(KernelArgBufferTest, givenSetUnifiedMemoryExecInfoOnKernelWithIndirectSta auto gmm = std::make_unique(pDevice->getRootDeviceEnvironment().getGmmHelper(), nullptr, 0, 0, GMM_RESOURCE_USAGE_OCL_BUFFER, StorageInfo{}, gmmRequirements); MockGraphicsAllocation gfxAllocation; gfxAllocation.setDefaultGmm(gmm.get()); - auto &productHelper = pClDevice->getProductHelper(); + for (const auto type : allocationTypes) { - gfxAllocation.setAllocationType(type.allocationType, productHelper); + gfxAllocation.setAllocationType(type.allocationType); pKernel->setUnifiedMemoryExecInfo(&gfxAllocation); gmm->setCompressionEnabled(type.compressed); @@ -626,9 +616,9 @@ TEST_F(KernelArgBufferTest, givenSVMAllocsManagerWithCompressedSVMAllocationsWhe SvmAllocationData allocData(0); allocData.gpuAllocations.addAllocation(&gfxAllocation); allocData.device = &pClDevice->getDevice(); - auto &productHelper = pClDevice->getProductHelper(); + for (const auto type : allocationTypes) { - gfxAllocation.setAllocationType(type.allocationType, productHelper); + gfxAllocation.setAllocationType(type.allocationType); gmm->setCompressionEnabled(type.compressed); @@ -743,8 +733,7 @@ HWTEST_F(KernelArgBufferTestBindless, givenBindlessBuffersWhenPatchBindlessOffse TEST_F(KernelArgBufferTest, givenBufferAsHostMemoryWhenSettingKernelArgThenKernelUsesSystemMemory) { MockBuffer buffer; - auto &productHelper = pClDevice->getProductHelper(); - buffer.getGraphicsAllocation(mockRootDeviceIndex)->setAllocationType(AllocationType::bufferHostMemory, productHelper); + buffer.getGraphicsAllocation(mockRootDeviceIndex)->setAllocationType(AllocationType::bufferHostMemory); auto memVal = (cl_mem)&buffer; auto val = &memVal; @@ -759,8 +748,7 @@ TEST_F(KernelArgBufferTest, givenBufferAsHostMemoryWhenSettingKernelArgThenKerne TEST_F(KernelArgBufferTest, givenBufferAsDeviceMemoryWhenSettingKernelArgThenKernelNotUsesSystemMemory) { MockBuffer buffer; - auto &productHelper = pClDevice->getProductHelper(); - buffer.getGraphicsAllocation(mockRootDeviceIndex)->setAllocationType(AllocationType::buffer, productHelper); + buffer.getGraphicsAllocation(mockRootDeviceIndex)->setAllocationType(AllocationType::buffer); auto memVal = (cl_mem)&buffer; auto val = &memVal; @@ -775,8 +763,7 @@ TEST_F(KernelArgBufferTest, givenBufferAsDeviceMemoryWhenSettingKernelArgThenKer TEST_F(KernelArgBufferTest, givenBufferAsDeviceMemoryAndKernelIsAlreadySetToUseSystemWhenSettingKernelArgThenKernelUsesSystemMemory) { MockBuffer buffer; - auto &productHelper = pClDevice->getProductHelper(); - buffer.getGraphicsAllocation(mockRootDeviceIndex)->setAllocationType(AllocationType::buffer, productHelper); + buffer.getGraphicsAllocation(mockRootDeviceIndex)->setAllocationType(AllocationType::buffer); auto memVal = (cl_mem)&buffer; auto val = &memVal; diff --git a/opencl/test/unit_test/kernel/kernel_arg_svm_tests.cpp b/opencl/test/unit_test/kernel/kernel_arg_svm_tests.cpp index 402851ec5c..9d73bf2de3 100644 --- a/opencl/test/unit_test/kernel/kernel_arg_svm_tests.cpp +++ b/opencl/test/unit_test/kernel/kernel_arg_svm_tests.cpp @@ -714,8 +714,7 @@ TEST_F(KernelArgSvmTest, GivenZeroCopySvmPtrWhenSettingKernelArgThenKernelUsesSy auto svmData = pContext->getSVMAllocsManager()->getSVMAlloc(alloc); auto gpuAllocation = svmData->gpuAllocations.getGraphicsAllocation(*pContext->getRootDeviceIndices().begin()); - auto &productHelper = pClDevice->getProductHelper(); - gpuAllocation->setAllocationType(NEO::AllocationType::svmZeroCopy, productHelper); + gpuAllocation->setAllocationType(NEO::AllocationType::svmZeroCopy); EXPECT_FALSE(pKernel->isAnyKernelArgumentUsingSystemMemory()); @@ -741,8 +740,7 @@ TEST_F(KernelArgSvmTest, GivenGpuSvmPtrWhenSettingKernelArgThenKernelNotUsesSyst auto svmData = pContext->getSVMAllocsManager()->getSVMAlloc(alloc); auto gpuAllocation = svmData->gpuAllocations.getGraphicsAllocation(*pContext->getRootDeviceIndices().begin()); - auto &productHelper = pClDevice->getProductHelper(); - gpuAllocation->setAllocationType(NEO::AllocationType::svmGpu, productHelper); + gpuAllocation->setAllocationType(NEO::AllocationType::svmGpu); EXPECT_FALSE(pKernel->isAnyKernelArgumentUsingSystemMemory()); @@ -768,8 +766,7 @@ TEST_F(KernelArgSvmTest, GivenGpuSvmPtrAndKernelIsAlreadySetToUseSystemWhenSetti auto svmData = pContext->getSVMAllocsManager()->getSVMAlloc(alloc); auto gpuAllocation = svmData->gpuAllocations.getGraphicsAllocation(*pContext->getRootDeviceIndices().begin()); - auto &productHelper = pClDevice->getProductHelper(); - gpuAllocation->setAllocationType(NEO::AllocationType::svmGpu, productHelper); + gpuAllocation->setAllocationType(NEO::AllocationType::svmGpu); EXPECT_FALSE(pKernel->isAnyKernelArgumentUsingSystemMemory()); pKernel->anyKernelArgumentUsingSystemMemory = true; diff --git a/opencl/test/unit_test/xe_hpc_core/gfx_core_helper_tests_xe_hpc_core.cpp b/opencl/test/unit_test/xe_hpc_core/gfx_core_helper_tests_xe_hpc_core.cpp index 597590b48e..60a7e962c5 100644 --- a/opencl/test/unit_test/xe_hpc_core/gfx_core_helper_tests_xe_hpc_core.cpp +++ b/opencl/test/unit_test/xe_hpc_core/gfx_core_helper_tests_xe_hpc_core.cpp @@ -644,7 +644,7 @@ XE_HPC_CORETEST_F(ProductHelperTestXeHpcCore, givenDefaultProductHelperHwWhenGet auto &productHelper = getHelper(); MockGraphicsAllocation allocation; allocation.overrideMemoryPool(MemoryPool::localMemory); - allocation.setAllocationType(AllocationType::bufferHostMemory, pDevice->getProductHelper()); + allocation.setAllocationType(AllocationType::bufferHostMemory); EXPECT_FALSE(productHelper.isBlitCopyRequiredForLocalMemory(pDevice->getRootDeviceEnvironment(), allocation)); } diff --git a/shared/source/gmm_helper/gmm.cpp b/shared/source/gmm_helper/gmm.cpp index 8078f4fc71..f33c4944d8 100644 --- a/shared/source/gmm_helper/gmm.cpp +++ b/shared/source/gmm_helper/gmm.cpp @@ -22,22 +22,6 @@ #include "shared/source/memory_manager/definitions/storage_info.h" namespace NEO { -void Gmm::updateUsageAndCachableFlag(GMM_RESOURCE_USAGE_TYPE_ENUM gmmResourceUsage, const GmmRequirements &gmmRequirements) { - resourceParams.Usage = gmmResourceUsage; - this->preferNoCpuAccess = CacheSettingsHelper::preferNoCpuAccess(gmmResourceUsage, gmmHelper->getRootDeviceEnvironment()); - bool cacheable = !this->preferNoCpuAccess && !CacheSettingsHelper::isUncachedType(gmmResourceUsage); - - gmmRequirements.overriderPreferNoCpuAccess.doOverride(this->preferNoCpuAccess); - gmmRequirements.overriderCacheable.doOverride(cacheable); - if (NEO::debugManager.flags.OverrideGmmCacheableField.get() != -1) { - cacheable = !!NEO::debugManager.flags.OverrideGmmCacheableField.get(); - } - resourceParams.Flags.Info.Cacheable = cacheable; -} - -void Gmm::applyResourceInfo() { - gmmResourceInfo.reset(GmmResourceInfo::create(gmmHelper->getClientContext(), &resourceParams)); -} Gmm::Gmm(GmmHelper *gmmHelper, const void *alignedPtr, size_t alignedSize, size_t alignment, GMM_RESOURCE_USAGE_TYPE_ENUM gmmResourceUsage, const StorageInfo &storageInfo, const GmmRequirements &gmmRequirements) : gmmHelper(gmmHelper) { resourceParams.Type = RESOURCE_BUFFER; @@ -53,9 +37,20 @@ Gmm::Gmm(GmmHelper *gmmHelper, const void *alignedPtr, size_t alignedSize, size_ } } + resourceParams.Usage = gmmResourceUsage; resourceParams.Flags.Info.Linear = 1; - updateUsageAndCachableFlag(gmmResourceUsage, gmmRequirements); + this->preferNoCpuAccess = CacheSettingsHelper::preferNoCpuAccess(gmmResourceUsage, gmmHelper->getRootDeviceEnvironment()); + bool cacheable = !this->preferNoCpuAccess && !CacheSettingsHelper::isUncachedType(gmmResourceUsage); + + gmmRequirements.overriderPreferNoCpuAccess.doOverride(this->preferNoCpuAccess); + gmmRequirements.overriderCacheable.doOverride(cacheable); + + if (NEO::debugManager.flags.OverrideGmmCacheableField.get() != -1) { + cacheable = !!NEO::debugManager.flags.OverrideGmmCacheableField.get(); + } + + resourceParams.Flags.Info.Cacheable = cacheable; resourceParams.Flags.Gpu.Texture = 1; @@ -76,7 +71,7 @@ Gmm::Gmm(GmmHelper *gmmHelper, const void *alignedPtr, size_t alignedSize, size_ applyAppResource(storageInfo); applyDebugOverrides(); - applyResourceInfo(); + gmmResourceInfo.reset(GmmResourceInfo::create(gmmHelper->getClientContext(), &resourceParams)); } Gmm::Gmm(GmmHelper *gmmHelper, GMM_RESOURCE_INFO *inputGmm) : Gmm(gmmHelper, inputGmm, false) {} diff --git a/shared/source/gmm_helper/gmm.h b/shared/source/gmm_helper/gmm.h index 0d934de9c8..32d1f53a45 100644 --- a/shared/source/gmm_helper/gmm.h +++ b/shared/source/gmm_helper/gmm.h @@ -53,7 +53,6 @@ class Gmm { void applyAuxFlagsForBuffer(bool preferCompression); void applyMemoryFlags(const StorageInfo &storageInfo); void applyAppResource(const StorageInfo &storageInfo); - void applyResourceInfo(); bool unifiedAuxTranslationCapable() const; bool hasMultisampleControlSurface() const; @@ -63,7 +62,6 @@ class Gmm { uint32_t queryQPitch(GMM_RESOURCE_TYPE resType); void updateImgInfoAndDesc(ImageInfo &imgInfo, uint32_t arrayIndex, ImagePlane yuvPlaneType); void updateOffsetsInImgInfo(ImageInfo &imgInfo, uint32_t arrayIndex); - void updateUsageAndCachableFlag(GMM_RESOURCE_USAGE_TYPE_ENUM gmmResourceUsage, const GmmRequirements &gmmRequirements); uint8_t resourceCopyBlt(void *sys, void *gpu, uint32_t pitch, uint32_t height, unsigned char upload, ImagePlane plane); uint32_t getUnifiedAuxPitchTiles(); diff --git a/shared/source/memory_manager/graphics_allocation.cpp b/shared/source/memory_manager/graphics_allocation.cpp index 8170e05aeb..528f6f3afb 100644 --- a/shared/source/memory_manager/graphics_allocation.cpp +++ b/shared/source/memory_manager/graphics_allocation.cpp @@ -8,10 +8,8 @@ #include "graphics_allocation.h" #include "shared/source/command_stream/command_stream_receiver.h" -#include "shared/source/gmm_helper/cache_settings_helper.h" #include "shared/source/gmm_helper/gmm.h" #include "shared/source/gmm_helper/gmm_helper.h" -#include "shared/source/gmm_helper/resource_info.h" #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/bit_helpers.h" #include "shared/source/memory_manager/allocation_properties.h" @@ -20,16 +18,9 @@ #include "shared/source/utilities/logger.h" namespace NEO { -void GraphicsAllocation::setAllocationType(AllocationType allocationType, const ProductHelper &productHelper) { +void GraphicsAllocation::setAllocationType(AllocationType allocationType) { if (this->allocationType != allocationType) { this->allocationType = allocationType; - auto gmm = getDefaultGmm(); - if (gmm) { - GmmRequirements gmmRequirements{}; - auto gmmResourceUsage = CacheSettingsHelper::getGmmUsageType(allocationType, false, productHelper); - gmm->updateUsageAndCachableFlag(gmmResourceUsage, gmmRequirements); - gmm->applyResourceInfo(); - } fileLoggerInstance().logAllocation(this); } } diff --git a/shared/source/memory_manager/graphics_allocation.h b/shared/source/memory_manager/graphics_allocation.h index 665ae5bf3e..eda8b90b9b 100644 --- a/shared/source/memory_manager/graphics_allocation.h +++ b/shared/source/memory_manager/graphics_allocation.h @@ -36,7 +36,6 @@ class Gmm; class MemoryManager; class CommandStreamReceiver; class GraphicsAllocation; -class ProductHelper; struct AllocationProperties; @@ -151,7 +150,7 @@ class GraphicsAllocation : public IDNode { osHandle peekSharedHandle() const { return sharingInfo.sharedHandle; } void setSharedHandle(osHandle handle) { sharingInfo.sharedHandle = handle; } - void setAllocationType(AllocationType allocationType, const ProductHelper &productHelper); + void setAllocationType(AllocationType allocationType); AllocationType getAllocationType() const { return allocationType; } MemoryPool getMemoryPool() const { return memoryPool; } diff --git a/shared/test/unit_test/aub_mem_dump/aub_alloc_dump_tests.cpp b/shared/test/unit_test/aub_mem_dump/aub_alloc_dump_tests.cpp index 926690f9eb..37f779bcd3 100644 --- a/shared/test/unit_test/aub_mem_dump/aub_alloc_dump_tests.cpp +++ b/shared/test/unit_test/aub_mem_dump/aub_alloc_dump_tests.cpp @@ -36,44 +36,44 @@ struct AubFileStreamMock : public AubMemDump::AubFileStream { HWTEST_F(AubAllocDumpTests, givenBufferOrImageWhenGraphicsAllocationIsKnownThenItsTypeCanBeCheckedIfItIsWritable) { auto memoryManager = pDevice->getMemoryManager(); auto gfxAllocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{pDevice->getRootDeviceIndex(), MemoryConstants::pageSize}); - auto &productHelper = pDevice->getProductHelper(); - gfxAllocation->setAllocationType(AllocationType::buffer, productHelper); + + gfxAllocation->setAllocationType(AllocationType::buffer); EXPECT_FALSE(gfxAllocation->isMemObjectsAllocationWithWritableFlags()); EXPECT_FALSE(AubAllocDump::isWritableBuffer(*gfxAllocation)); - gfxAllocation->setAllocationType(AllocationType::buffer, productHelper); + gfxAllocation->setAllocationType(AllocationType::buffer); gfxAllocation->setMemObjectsAllocationWithWritableFlags(true); EXPECT_TRUE(AubAllocDump::isWritableBuffer(*gfxAllocation)); - gfxAllocation->setAllocationType(AllocationType::bufferHostMemory, productHelper); + gfxAllocation->setAllocationType(AllocationType::bufferHostMemory); gfxAllocation->setMemObjectsAllocationWithWritableFlags(false); EXPECT_FALSE(AubAllocDump::isWritableBuffer(*gfxAllocation)); - gfxAllocation->setAllocationType(AllocationType::bufferHostMemory, productHelper); + gfxAllocation->setAllocationType(AllocationType::bufferHostMemory); gfxAllocation->setMemObjectsAllocationWithWritableFlags(true); EXPECT_TRUE(AubAllocDump::isWritableBuffer(*gfxAllocation)); - gfxAllocation->setAllocationType(AllocationType::externalHostPtr, productHelper); + gfxAllocation->setAllocationType(AllocationType::externalHostPtr); gfxAllocation->setMemObjectsAllocationWithWritableFlags(false); EXPECT_FALSE(AubAllocDump::isWritableBuffer(*gfxAllocation)); - gfxAllocation->setAllocationType(AllocationType::externalHostPtr, productHelper); + gfxAllocation->setAllocationType(AllocationType::externalHostPtr); gfxAllocation->setMemObjectsAllocationWithWritableFlags(true); EXPECT_TRUE(AubAllocDump::isWritableBuffer(*gfxAllocation)); - gfxAllocation->setAllocationType(AllocationType::mapAllocation, productHelper); + gfxAllocation->setAllocationType(AllocationType::mapAllocation); gfxAllocation->setMemObjectsAllocationWithWritableFlags(false); EXPECT_FALSE(AubAllocDump::isWritableBuffer(*gfxAllocation)); - gfxAllocation->setAllocationType(AllocationType::mapAllocation, productHelper); + gfxAllocation->setAllocationType(AllocationType::mapAllocation); gfxAllocation->setMemObjectsAllocationWithWritableFlags(true); EXPECT_TRUE(AubAllocDump::isWritableBuffer(*gfxAllocation)); - gfxAllocation->setAllocationType(AllocationType::image, productHelper); + gfxAllocation->setAllocationType(AllocationType::image); gfxAllocation->setMemObjectsAllocationWithWritableFlags(false); EXPECT_FALSE(AubAllocDump::isWritableImage(*gfxAllocation)); - gfxAllocation->setAllocationType(AllocationType::image, productHelper); + gfxAllocation->setAllocationType(AllocationType::image); gfxAllocation->setMemObjectsAllocationWithWritableFlags(true); EXPECT_TRUE(AubAllocDump::isWritableImage(*gfxAllocation)); diff --git a/shared/test/unit_test/command_stream/aub_command_stream_receiver_1_tests.cpp b/shared/test/unit_test/command_stream/aub_command_stream_receiver_1_tests.cpp index a586a815c8..1fc272918a 100644 --- a/shared/test/unit_test/command_stream/aub_command_stream_receiver_1_tests.cpp +++ b/shared/test/unit_test/command_stream/aub_command_stream_receiver_1_tests.cpp @@ -786,7 +786,6 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenWriteMe aubCsr->setupContext(*pDevice->getDefaultEngine().osContext); memoryManager.reset(new OsAgnosticMemoryManager(*pDevice->executionEnvironment)); aubCsr->initializeEngine(); - auto &productHelper = pDevice->getProductHelper(); auto gfxAllocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{pDevice->getRootDeviceIndex(), MemoryConstants::pageSize}); @@ -810,7 +809,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenWriteMe for (auto allocationType : onlyOneTimeAubWritableTypes) { gfxAllocation->setAubWritable(true, GraphicsAllocation::defaultBank); - gfxAllocation->setAllocationType(allocationType, productHelper); + gfxAllocation->setAllocationType(allocationType); aubCsr->writeMemory(*gfxAllocation); EXPECT_FALSE(aubCsr->isAubWritable(*gfxAllocation)); diff --git a/shared/test/unit_test/command_stream/aub_command_stream_receiver_2_tests.cpp b/shared/test/unit_test/command_stream/aub_command_stream_receiver_2_tests.cpp index 52f72a97da..4b83d3a1ec 100644 --- a/shared/test/unit_test/command_stream/aub_command_stream_receiver_2_tests.cpp +++ b/shared/test/unit_test/command_stream/aub_command_stream_receiver_2_tests.cpp @@ -272,7 +272,6 @@ HWTEST_F(AubCommandStreamReceiverTests, givenNoCpuPtrAndNotLockableAllocationWhe auto aubExecutionEnvironment = getEnvironment>(true, true, true); auto aubCsr = aubExecutionEnvironment->template getCsr>(); auto mockMemoryManager = new MockMemoryManager(); - auto &productHelper = pDevice->getProductHelper(); auto memoryManagerBackup = aubExecutionEnvironment->executionEnvironment->memoryManager.release(); aubExecutionEnvironment->executionEnvironment->memoryManager.reset(mockMemoryManager); @@ -282,7 +281,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenNoCpuPtrAndNotLockableAllocationWhe constexpr uint64_t initGpuAddress = 1234; constexpr size_t initSize = 10; MockGraphicsAllocation allocation(nullptr, initGpuAddress, initSize); - allocation.setAllocationType(AllocationType::buffer, productHelper); + allocation.setAllocationType(AllocationType::buffer); allocation.overrideMemoryPool(MemoryPool::localMemory); aubExecutionEnvironment->executionEnvironment->rootDeviceEnvironments[0]->initGmm(); @@ -320,8 +319,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenNoCpuPtrAndLockableAllocationWhenGe constexpr uint64_t initGpuAddress = 1234; constexpr size_t initSize = 10; MockGraphicsAllocation allocation(nullptr, initGpuAddress, initSize); - auto &productHelper = pDevice->getProductHelper(); - allocation.setAllocationType(AllocationType::bufferHostMemory, productHelper); + allocation.setAllocationType(AllocationType::bufferHostMemory); allocation.overrideMemoryPool(MemoryPool::localMemory); aubExecutionEnvironment->executionEnvironment->rootDeviceEnvironments[0]->initGmm(); diff --git a/shared/test/unit_test/command_stream/command_stream_receiver_tests.cpp b/shared/test/unit_test/command_stream/command_stream_receiver_tests.cpp index 382839ab47..324470fe90 100644 --- a/shared/test/unit_test/command_stream/command_stream_receiver_tests.cpp +++ b/shared/test/unit_test/command_stream/command_stream_receiver_tests.cpp @@ -1654,8 +1654,7 @@ TEST(CommandStreamReceiverSimpleTest, givenNewResourceFlushEnabledWhenProvidingN DeviceBitfield deviceBitfield(1); MockCommandStreamReceiver csr(executionEnvironment, 0, deviceBitfield); MockGraphicsAllocation mockAllocation; - auto &productHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper(); - mockAllocation.setAllocationType(AllocationType::kernelIsa, productHelper); + mockAllocation.setAllocationType(AllocationType::kernelIsa); csr.useNewResourceImplicitFlush = true; csr.newResources = false; diff --git a/shared/test/unit_test/memory_manager/graphics_allocation_tests.cpp b/shared/test/unit_test/memory_manager/graphics_allocation_tests.cpp index 86ebc361da..9eb5c94061 100644 --- a/shared/test/unit_test/memory_manager/graphics_allocation_tests.cpp +++ b/shared/test/unit_test/memory_manager/graphics_allocation_tests.cpp @@ -5,12 +5,9 @@ * */ -#include "shared/source/gmm_helper/gmm.h" -#include "shared/test/common/fixtures/device_fixture.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/mocks/mock_aub_csr.h" #include "shared/test/common/mocks/mock_command_stream_receiver.h" -#include "shared/test/common/mocks/mock_device.h" #include "shared/test/common/mocks/mock_execution_environment.h" #include "shared/test/common/mocks/mock_graphics_allocation.h" #include "shared/test/common/test_macros/hw_test.h" @@ -639,16 +636,4 @@ TEST(GraphicsAllocationTest, givenGraphicsAllocationsWhenAllocationTypeIsRingBuf graphicsAllocation.hasAllocationReadOnlyTypeCallBase = true; graphicsAllocation.allocationType = AllocationType::ringBuffer; EXPECT_TRUE(graphicsAllocation.hasAllocationReadOnlyType()); -} -using GraphicsAllocationSetAllocationTypeTest = Test; -HWTEST_F(GraphicsAllocationSetAllocationTypeTest, givenAnotherAllocationTypeWhenCalSetAllocationTypeThenUsageAndCacheableAreSetCorrectly) { - MockGraphicsAllocation graphicsAllocation; - GmmRequirements gmmRequirements{}; - auto gmm = std::unique_ptr(new Gmm(pDevice->getGmmHelper(), nullptr, 1, 0, GMM_RESOURCE_USAGE_OCL_BUFFER, {}, gmmRequirements)); - graphicsAllocation.setDefaultGmm(gmm.get()); - auto &productHelper = getHelper(); - graphicsAllocation.setAllocationType(AllocationType::bufferHostMemory, productHelper); - - EXPECT_EQ(graphicsAllocation.getDefaultGmm()->resourceParams.Usage, GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER); - EXPECT_TRUE(graphicsAllocation.getDefaultGmm()->resourceParams.Flags.Info.Cacheable); } \ No newline at end of file diff --git a/shared/test/unit_test/memory_manager/memory_manager_allocate_in_preferred_pool_tests.cpp b/shared/test/unit_test/memory_manager/memory_manager_allocate_in_preferred_pool_tests.cpp index a2afd073dc..5deceba345 100644 --- a/shared/test/unit_test/memory_manager/memory_manager_allocate_in_preferred_pool_tests.cpp +++ b/shared/test/unit_test/memory_manager/memory_manager_allocate_in_preferred_pool_tests.cpp @@ -1118,7 +1118,7 @@ TEST(MemoryManagerTest, givenMemoryManagerWhenAllocationIsCommandBufferAndItIsSe std::swap(executionEnvironment.rootDeviceEnvironments[0]->productHelper, productHelper); MockMemoryManager memoryManager(false, true, executionEnvironment); MockGraphicsAllocation mockGa; - mockGa.setAllocationType(AllocationType::commandBuffer, *productHelper.get()); + mockGa.setAllocationType(AllocationType::commandBuffer); mockGa.hasAllocationReadOnlyTypeResult = true; @@ -1143,7 +1143,7 @@ TEST(MemoryManagerTest, givenMemoryManagerWhenAllocationIsCommandBufferAndMultiC std::swap(executionEnvironment.rootDeviceEnvironments[0]->productHelper, productHelper); MockMemoryManager memoryManager(false, true, executionEnvironment); MockGraphicsAllocation mockGa; - mockGa.setAllocationType(AllocationType::commandBuffer, *productHelper.get()); + mockGa.setAllocationType(AllocationType::commandBuffer); mockGa.hasAllocationReadOnlyTypeResult = true; @@ -1169,7 +1169,7 @@ TEST(MemoryManagerTest, givenMemoryManagerWhenAllocationTypeAndPlatrormSupportRe std::swap(executionEnvironment.rootDeviceEnvironments[0]->productHelper, productHelper); MockMemoryManager memoryManager(false, true, executionEnvironment); MockGraphicsAllocation mockGa; - mockGa.setAllocationType(AllocationType::buffer, *productHelper.get()); + mockGa.setAllocationType(AllocationType::buffer); mockGa.hasAllocationReadOnlyTypeResult = true; diff --git a/shared/test/unit_test/memory_manager/memory_manager_tests.cpp b/shared/test/unit_test/memory_manager/memory_manager_tests.cpp index 7e1dc7e467..3569d7719a 100644 --- a/shared/test/unit_test/memory_manager/memory_manager_tests.cpp +++ b/shared/test/unit_test/memory_manager/memory_manager_tests.cpp @@ -3073,8 +3073,8 @@ HWTEST_F(MemoryAllocatorTest, givenUseLocalPreferredForCacheableBuffersAndCompre EXPECT_EQ(false, allocData.storageInfo.systemMemoryForced); } } -using MemoryTransferHelperTest = Test; -HWTEST_F(MemoryTransferHelperTest, WhenBlitterIsSelectedButBlitCopyFailsThenFallbackToCopyOnCPU) { + +TEST(MemoryTransferHelperTest, WhenBlitterIsSelectedButBlitCopyFailsThenFallbackToCopyOnCPU) { constexpr uint32_t dataSize = 16; uint8_t destData[dataSize] = {}; uint8_t srcData[dataSize] = {}; @@ -3082,8 +3082,7 @@ HWTEST_F(MemoryTransferHelperTest, WhenBlitterIsSelectedButBlitCopyFailsThenFall srcData[i] = i; } MockGraphicsAllocation graphicsAllocation{destData, sizeof(destData)}; - auto &productHelper = getHelper(); - graphicsAllocation.setAllocationType(AllocationType::bufferHostMemory, productHelper); + graphicsAllocation.setAllocationType(AllocationType::bufferHostMemory); auto hwInfo = *defaultHwInfo; hwInfo.capabilityTable.blitterOperationsSupported = false; @@ -3097,15 +3096,14 @@ HWTEST_F(MemoryTransferHelperTest, WhenBlitterIsSelectedButBlitCopyFailsThenFall EXPECT_EQ(0, memcmp(destData, srcData, dataSize)); } -HWTEST_F(MemoryTransferHelperTest, givenBlitOperationSupportedWhenBcsEngineNotAvailableThenReturnUnsupported) { +TEST(MemoryTransferHelperTest, givenBlitOperationSupportedWhenBcsEngineNotAvailableThenReturnUnsupported) { constexpr uint32_t dataSize = 16; uint8_t destData[dataSize] = {}; uint8_t srcData[dataSize] = {}; MockGraphicsAllocation graphicsAllocation{destData, sizeof(destData)}; graphicsAllocation.storageInfo.memoryBanks = 1; - auto &productHelper = getHelper(); - graphicsAllocation.setAllocationType(AllocationType::buffer, productHelper); + graphicsAllocation.setAllocationType(AllocationType::buffer); auto hwInfo = *defaultHwInfo; hwInfo.capabilityTable.blitterOperationsSupported = true; diff --git a/shared/test/unit_test/os_interface/aub_memory_operations_handler_tests.cpp b/shared/test/unit_test/os_interface/aub_memory_operations_handler_tests.cpp index f560a5ddcb..a6c7ab8710 100644 --- a/shared/test/unit_test/os_interface/aub_memory_operations_handler_tests.cpp +++ b/shared/test/unit_test/os_interface/aub_memory_operations_handler_tests.cpp @@ -75,8 +75,7 @@ TEST_F(AubMemoryOperationsHandlerTests, givenAubManagerWhenCallingLockThenTrueRe TEST_F(AubMemoryOperationsHandlerTests, givenAubManagerAndAllocationOfOneTimeAubWritableAllocationTypeWhenMakeResidentCalledTwoTimesThenWriteMemoryOnce) { ASSERT_TRUE(AubHelper::isOneTimeAubWritableAllocationType(AllocationType::buffer)); - auto &productHelper = device->getProductHelper(); - allocPtr->setAllocationType(AllocationType::buffer, productHelper); + allocPtr->setAllocationType(AllocationType::buffer); MockAubManager aubManager; getMemoryOperationsHandler()->setAubManager(&aubManager); diff --git a/shared/test/unit_test/os_interface/product_helper_tests.cpp b/shared/test/unit_test/os_interface/product_helper_tests.cpp index ddd6abf23e..1aa29c90ab 100644 --- a/shared/test/unit_test/os_interface/product_helper_tests.cpp +++ b/shared/test/unit_test/os_interface/product_helper_tests.cpp @@ -524,7 +524,7 @@ HWTEST_F(ProductHelperTest, givenLockableAllocationWhenGettingIsBlitCopyRequired pInHwInfo.capabilityTable.blitterOperationsSupported = true; MockGraphicsAllocation graphicsAllocation; - graphicsAllocation.setAllocationType(AllocationType::bufferHostMemory, *productHelper); + graphicsAllocation.setAllocationType(AllocationType::bufferHostMemory); EXPECT_TRUE(GraphicsAllocation::isLockable(graphicsAllocation.getAllocationType())); graphicsAllocation.overrideMemoryPool(MemoryPool::localMemory); @@ -556,7 +556,7 @@ HWTEST_F(ProductHelperTest, givenNotLockableAllocationWhenGettingIsBlitCopyRequi hwInfo.capabilityTable.blitterOperationsSupported = true; MockGraphicsAllocation graphicsAllocation; - graphicsAllocation.setAllocationType(AllocationType::svmGpu, *productHelper); + graphicsAllocation.setAllocationType(AllocationType::svmGpu); EXPECT_FALSE(GraphicsAllocation::isLockable(graphicsAllocation.getAllocationType())); graphicsAllocation.overrideMemoryPool(MemoryPool::localMemory); @@ -596,7 +596,7 @@ HWTEST2_F(ProductHelperTest, givenProductHelperWhenGettingIsBlitCopyRequiredForL MockGraphicsAllocation graphicsAllocation; graphicsAllocation.overrideMemoryPool(MemoryPool::localMemory); - graphicsAllocation.setAllocationType(AllocationType::bufferHostMemory, *productHelper); + graphicsAllocation.setAllocationType(AllocationType::bufferHostMemory); EXPECT_FALSE(productHelper->isBlitCopyRequiredForLocalMemory(rootDeviceEnvironment, graphicsAllocation)); } diff --git a/shared/test/unit_test/os_interface/windows/file_logger_win_tests.cpp b/shared/test/unit_test/os_interface/windows/file_logger_win_tests.cpp index 2469002acf..f3c6e66f6f 100644 --- a/shared/test/unit_test/os_interface/windows/file_logger_win_tests.cpp +++ b/shared/test/unit_test/os_interface/windows/file_logger_win_tests.cpp @@ -22,7 +22,6 @@ TEST_F(FileLoggerTests, GivenLogAllocationMemoryPoolFlagThenLogsCorrectInfo) { DebugVariables flags; flags.LogAllocationMemoryPool.set(true); FullyEnabledFileLogger fileLogger(testFile, flags); - auto &productHelper = executionEnvironment->rootDeviceEnvironments[0]->getProductHelper(); // Log file not created bool logFileCreated = fileExists(fileLogger.getLogFileName()); @@ -30,7 +29,7 @@ TEST_F(FileLoggerTests, GivenLogAllocationMemoryPoolFlagThenLogsCorrectInfo) { MockWddmAllocation allocation(getGmmHelper()); allocation.handle = 4; - allocation.setAllocationType(AllocationType::buffer, productHelper); + allocation.setAllocationType(AllocationType::buffer); allocation.memoryPool = MemoryPool::system64KBPages; allocation.getDefaultGmm()->resourceParams.Flags.Info.NonLocalOnly = 0; allocation.setGpuAddress(0x12345); @@ -67,7 +66,6 @@ TEST_F(FileLoggerTests, GivenLogAllocationMemoryPoolFlagSetFalseThenAllocationIs DebugVariables flags; flags.LogAllocationMemoryPool.set(false); FullyEnabledFileLogger fileLogger(testFile, flags); - auto &productHelper = executionEnvironment->rootDeviceEnvironments[0]->getProductHelper(); // Log file not created bool logFileCreated = fileExists(fileLogger.getLogFileName()); @@ -77,7 +75,7 @@ TEST_F(FileLoggerTests, GivenLogAllocationMemoryPoolFlagSetFalseThenAllocationIs executionEnvironment->rootDeviceEnvironments[0]->initGmm(); MockWddmAllocation allocation(executionEnvironment->rootDeviceEnvironments[0]->getGmmHelper()); allocation.handle = 4; - allocation.setAllocationType(AllocationType::buffer, productHelper); + allocation.setAllocationType(AllocationType::buffer); allocation.memoryPool = MemoryPool::system64KBPages; allocation.getDefaultGmm()->resourceParams.Flags.Info.NonLocalOnly = 0; diff --git a/shared/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp b/shared/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp index dfceccfc5f..bf398d693c 100644 --- a/shared/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp +++ b/shared/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp @@ -1415,7 +1415,7 @@ TEST_F(WddmMemoryManagerSimpleTest, whenDestroyingAllocationWithReservedGpuVirtu TEST_F(WddmMemoryManagerSimpleTest, givenAllocationWithReservedGpuVirtualAddressWhenMapCallFailsDuringCreateWddmAllocationThenReleasePreferredAddress) { MockWddmAllocation allocation(rootDeviceEnvironment->getGmmHelper(), 1); - allocation.setAllocationType(AllocationType::kernelIsa, csr->getProductHelper()); + allocation.setAllocationType(AllocationType::kernelIsa); uint64_t gpuAddress = 0x123; uint64_t sizeForFree = 0x1234; allocation.setReservedGpuVirtualAddress(gpuAddress); @@ -1437,8 +1437,7 @@ TEST_F(WddmMemoryManagerSimpleTest, givenMultiHandleAllocationAndPreferredGpuVaI uint32_t numGmms = 10; MockWddmAllocation allocation(rootDeviceEnvironment->getGmmHelper(), numGmms); - - allocation.setAllocationType(AllocationType::buffer, csr->getProductHelper()); + allocation.setAllocationType(AllocationType::buffer); allocation.storageInfo.multiStorage = true; wddm->callBaseMapGpuVa = true; @@ -1465,7 +1464,7 @@ TEST_F(WddmMemoryManagerSimpleTest, givenMultiHandleAllocationWhenCreatePhysical uint32_t numGmms = 10; MockWddmAllocation allocation(rootDeviceEnvironment->getGmmHelper(), numGmms); - allocation.setAllocationType(AllocationType::buffer, csr->getProductHelper()); + allocation.setAllocationType(AllocationType::buffer); allocation.storageInfo.multiStorage = true; wddm->callBaseMapGpuVa = true; @@ -1483,7 +1482,7 @@ TEST_F(WddmMemoryManagerSimpleTest, givenMultiHandleAllocationWhenCreatePhysical uint32_t numGmms = 10; MockWddmAllocation allocation(rootDeviceEnvironment->getGmmHelper(), numGmms); - allocation.setAllocationType(AllocationType::buffer, csr->getProductHelper()); + allocation.setAllocationType(AllocationType::buffer); allocation.storageInfo.multiStorage = true; wddm->callBaseMapGpuVa = true; diff --git a/shared/test/unit_test/utilities/logger_tests.cpp b/shared/test/unit_test/utilities/logger_tests.cpp index 495bf0de81..773a6d7eb9 100644 --- a/shared/test/unit_test/utilities/logger_tests.cpp +++ b/shared/test/unit_test/utilities/logger_tests.cpp @@ -11,10 +11,8 @@ #include "shared/source/memory_manager/memory_manager.h" #include "shared/source/memory_manager/memory_pool.h" #include "shared/source/utilities/logger.h" -#include "shared/test/common/fixtures/device_fixture.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/gtest_helpers.h" -#include "shared/test/common/test_macros/hw_test.h" #include "shared/test/common/utilities/base_object_utils.h" #include "gtest/gtest.h" @@ -495,17 +493,16 @@ TEST(AllocationTypeLoggingSingle, givenGraphicsAllocationTypeWhenConvertingToStr EXPECT_STREQ(result, "ILLEGAL_VALUE"); } -using AllocationTypeLoggingSingleTest = Test; -HWTEST_F(AllocationTypeLoggingSingleTest, givenAllocationTypeWhenConvertingToStringThenSupportAll) { + +TEST(AllocationTypeLoggingSingle, givenAllocationTypeWhenConvertingToStringThenSupportAll) { std::string testFile = "testfile"; DebugVariables flags; FullyEnabledFileLogger fileLogger(testFile, flags); GraphicsAllocation graphicsAllocation(0, 1u /*num gmms*/, AllocationType::unknown, nullptr, 0, 0, MemoryPool::memoryNull, MemoryManager::maxOsContextCount, 0llu); - auto &productHelper = getHelper(); for (uint32_t i = 0; i < static_cast(AllocationType::count); i++) { - graphicsAllocation.setAllocationType(static_cast(i), productHelper); + graphicsAllocation.setAllocationType(static_cast(i)); auto result = getAllocationTypeString(&graphicsAllocation); diff --git a/shared/test/unit_test/xe2_hpg_core/gfx_core_helper_tests_xe2_hpg_core.cpp b/shared/test/unit_test/xe2_hpg_core/gfx_core_helper_tests_xe2_hpg_core.cpp index 91e353f2c5..07828a4e28 100644 --- a/shared/test/unit_test/xe2_hpg_core/gfx_core_helper_tests_xe2_hpg_core.cpp +++ b/shared/test/unit_test/xe2_hpg_core/gfx_core_helper_tests_xe2_hpg_core.cpp @@ -517,7 +517,7 @@ XE2_HPG_CORETEST_F(ProductHelperTestXe2HpgCore, givenProductHelperWhenGettingIsB auto &productHelper = getHelper(); MockGraphicsAllocation allocation; allocation.overrideMemoryPool(MemoryPool::localMemory); - allocation.setAllocationType(AllocationType::bufferHostMemory, productHelper); + allocation.setAllocationType(AllocationType::bufferHostMemory); EXPECT_FALSE(productHelper.isBlitCopyRequiredForLocalMemory(pDevice->getRootDeviceEnvironment(), allocation)); } diff --git a/shared/test/unit_test/xe_hpc_core/pvc/engine_node_helper_tests_pvc.cpp b/shared/test/unit_test/xe_hpc_core/pvc/engine_node_helper_tests_pvc.cpp index 793f8b6b23..c8c9219036 100644 --- a/shared/test/unit_test/xe_hpc_core/pvc/engine_node_helper_tests_pvc.cpp +++ b/shared/test/unit_test/xe_hpc_core/pvc/engine_node_helper_tests_pvc.cpp @@ -590,7 +590,7 @@ PVCTEST_F(EngineNodeHelperPvcTests, givenNonTile0AccessWhenGettingIsBlitCopyRequ auto &productHelper = getHelper(); hwInfo.capabilityTable.blitterOperationsSupported = true; MockGraphicsAllocation graphicsAllocation; - graphicsAllocation.setAllocationType(AllocationType::bufferHostMemory, productHelper); + graphicsAllocation.setAllocationType(AllocationType::bufferHostMemory); EXPECT_TRUE(GraphicsAllocation::isLockable(graphicsAllocation.getAllocationType())); graphicsAllocation.overrideMemoryPool(MemoryPool::localMemory); hwInfo.platform.usRevId = 0u;