feature: Add ftrHeaplessMode flag

Pass hwInfo to isHeaplessModeEnabled and isForceBindlessRequired functions.

Related-To: NEO-14526

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2025-04-01 23:42:36 +00:00
committed by Compute-Runtime-Automation
parent 8961e8b50d
commit 504440fc4d
100 changed files with 182 additions and 163 deletions

View File

@@ -132,7 +132,7 @@ CommandQueue::CommandQueue(Context *context, ClDevice *device, const cl_queue_pr
device->getDevice().getL0Debugger()->notifyCommandQueueCreated(&device->getDevice());
}
this->heaplessModeEnabled = compilerProductHelper.isHeaplessModeEnabled();
this->heaplessModeEnabled = compilerProductHelper.isHeaplessModeEnabled(hwInfo);
this->heaplessStateInitEnabled = compilerProductHelper.isHeaplessStateInitEnabled(this->heaplessModeEnabled);
this->isForceStateless = compilerProductHelper.isForceToStatelessRequired();

View File

@@ -28,7 +28,7 @@ bool ApiSpecificConfig::getGlobalBindlessHeapConfiguration(const ReleaseHelper *
}
bool ApiSpecificConfig::getBindlessMode(const Device &device) {
if (device.getCompilerProductHelper().isForceBindlessRequired()) {
if (device.getCompilerProductHelper().isForceBindlessRequired(device.getHardwareInfo())) {
return true;
}

View File

@@ -108,7 +108,7 @@ cl_int Program::linkBinary(Device *pDevice, const void *constantsInitData, size_
auto exportedFunctionHeapId = linkerInput->getExportedFunctionsSegmentId();
buildInfos[rootDeviceIndex].exportedFunctionsSurface = kernelInfoArray[exportedFunctionHeapId]->getGraphicsAllocation();
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
if (compilerProductHelper.isHeaplessModeEnabled()) {
if (compilerProductHelper.isHeaplessModeEnabled(pDevice->getHardwareInfo())) {
exportedFunctions.gpuAddress = static_cast<uintptr_t>(buildInfos[rootDeviceIndex].exportedFunctionsSurface->getGpuAddress());
} else {
exportedFunctions.gpuAddress = static_cast<uintptr_t>(buildInfos[rootDeviceIndex].exportedFunctionsSurface->getGpuAddressToPatch());

View File

@@ -110,7 +110,7 @@ std::string Program::getInternalOptions() const {
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::preserveVec3Type);
auto isDebuggerActive = pClDevice->getDevice().getDebugger() != nullptr;
CompilerOptions::concatenateAppend(internalOptions, compilerProductHelper.getCachingPolicyOptions(isDebuggerActive));
CompilerOptions::applyExtraInternalOptions(internalOptions, compilerProductHelper, NEO::CompilerOptions::HeaplessMode::defaultMode);
CompilerOptions::applyExtraInternalOptions(internalOptions, hwInfo, compilerProductHelper, NEO::CompilerOptions::HeaplessMode::defaultMode);
return internalOptions;
}

View File

@@ -1653,7 +1653,7 @@ TEST_F(BuiltInTests, WhenBuiltinsLibIsCreatedThenAllStoragesSizeIsTwo) {
TEST_F(BuiltInTests, GivenTypeAnyWhenGettingBuiltinCodeThenCorrectBuiltinReturned) {
auto builtinsLib = std::unique_ptr<BuiltinsLib>(new BuiltinsLib());
BuiltinCode code = builtinsLib->getBuiltinCode(EBuiltInOps::adjustBuiltinType<EBuiltInOps::copyBufferToBuffer>(false, pDevice->getCompilerProductHelper().isHeaplessModeEnabled()), BuiltinCode::ECodeType::any, *pDevice);
BuiltinCode code = builtinsLib->getBuiltinCode(EBuiltInOps::adjustBuiltinType<EBuiltInOps::copyBufferToBuffer>(false, pDevice->getCompilerProductHelper().isHeaplessModeEnabled(*defaultHwInfo)), BuiltinCode::ECodeType::any, *pDevice);
EXPECT_EQ(BuiltinCode::ECodeType::binary, code.type);
EXPECT_NE(0u, code.resource.size());
EXPECT_EQ(pDevice, code.targetDevice);
@@ -1661,7 +1661,7 @@ TEST_F(BuiltInTests, GivenTypeAnyWhenGettingBuiltinCodeThenCorrectBuiltinReturne
TEST_F(BuiltInTests, GivenTypeBinaryWhenGettingBuiltinCodeThenCorrectBuiltinReturned) {
auto builtinsLib = std::unique_ptr<BuiltinsLib>(new BuiltinsLib());
BuiltinCode code = builtinsLib->getBuiltinCode(EBuiltInOps::adjustBuiltinType<EBuiltInOps::copyBufferToBuffer>(false, pDevice->getCompilerProductHelper().isHeaplessModeEnabled()), BuiltinCode::ECodeType::binary, *pDevice);
BuiltinCode code = builtinsLib->getBuiltinCode(EBuiltInOps::adjustBuiltinType<EBuiltInOps::copyBufferToBuffer>(false, pDevice->getCompilerProductHelper().isHeaplessModeEnabled(*defaultHwInfo)), BuiltinCode::ECodeType::binary, *pDevice);
EXPECT_EQ(BuiltinCode::ECodeType::binary, code.type);
EXPECT_NE(0u, code.resource.size());
EXPECT_EQ(pDevice, code.targetDevice);
@@ -1810,7 +1810,7 @@ TEST_F(BuiltInTests, GivenTypeIntermediateWhenCreatingProgramFromCodeThenNullPoi
TEST_F(BuiltInTests, GivenTypeBinaryWhenCreatingProgramFromCodeThenValidPointerIsReturned) {
auto builtinsLib = std::unique_ptr<BuiltinsLib>(new BuiltinsLib());
const BuiltinCode bc = builtinsLib->getBuiltinCode(EBuiltInOps::adjustBuiltinType<EBuiltInOps::copyBufferToBuffer>(false, pDevice->getCompilerProductHelper().isHeaplessModeEnabled()), BuiltinCode::ECodeType::binary, *pDevice);
const BuiltinCode bc = builtinsLib->getBuiltinCode(EBuiltInOps::adjustBuiltinType<EBuiltInOps::copyBufferToBuffer>(false, pDevice->getCompilerProductHelper().isHeaplessModeEnabled(*defaultHwInfo)), BuiltinCode::ECodeType::binary, *pDevice);
EXPECT_NE(0u, bc.resource.size());
auto program = std::unique_ptr<Program>(BuiltinDispatchInfoBuilder::createProgramFromCode(bc, toClDeviceVector(*pClDevice)));
EXPECT_NE(nullptr, program.get());
@@ -1898,7 +1898,7 @@ TEST_F(BuiltInTests, givenSipKernelWhenAllocationFailsThenItHasNullptrGraphicsAl
TEST_F(BuiltInTests, givenDebugFlagForceUseSourceWhenArgIsBinaryThenReturnBuiltinCodeBinary) {
debugManager.flags.RebuildPrecompiledKernels.set(true);
auto builtinsLib = std::unique_ptr<BuiltinsLib>(new BuiltinsLib());
BuiltinCode code = builtinsLib->getBuiltinCode(EBuiltInOps::adjustBuiltinType<EBuiltInOps::copyBufferToBuffer>(false, pDevice->getCompilerProductHelper().isHeaplessModeEnabled()), BuiltinCode::ECodeType::binary, *pDevice);
BuiltinCode code = builtinsLib->getBuiltinCode(EBuiltInOps::adjustBuiltinType<EBuiltInOps::copyBufferToBuffer>(false, pDevice->getCompilerProductHelper().isHeaplessModeEnabled(*defaultHwInfo)), BuiltinCode::ECodeType::binary, *pDevice);
EXPECT_EQ(BuiltinCode::ECodeType::binary, code.type);
EXPECT_NE(0u, code.resource.size());
EXPECT_EQ(pDevice, code.targetDevice);

View File

@@ -182,7 +182,7 @@ struct BuiltinParamsCommandQueueHwTests : public CommandQueueHwTest {
HWTEST_F(BuiltinParamsCommandQueueHwTests, givenEnqueueReadWriteBufferCallWhenBuiltinParamsArePassedThenCheckValuesCorectness) {
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
auto builtIn = compilerProductHelper.isHeaplessModeEnabled() ? EBuiltInOps::copyBufferToBufferStatelessHeapless : EBuiltInOps::copyBufferToBuffer;
auto builtIn = compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo) ? EBuiltInOps::copyBufferToBufferStatelessHeapless : EBuiltInOps::copyBufferToBuffer;
setUpImpl(builtIn);
BufferDefaults::context = context;
auto buffer = clUniquePtr(BufferHelper<>::create());
@@ -314,7 +314,7 @@ HWTEST_F(BuiltinParamsCommandQueueHwTests, givenEnqueueReadImageCallWhenBuiltinP
HWTEST_F(BuiltinParamsCommandQueueHwTests, givenEnqueueReadWriteBufferRectCallWhenBuiltinParamsArePassedThenCheckValuesCorectness) {
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
auto builtIn = compilerProductHelper.isHeaplessModeEnabled() ? EBuiltInOps::copyBufferRectStatelessHeapless : EBuiltInOps::copyBufferRect;
auto builtIn = compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo) ? EBuiltInOps::copyBufferRectStatelessHeapless : EBuiltInOps::copyBufferRect;
setUpImpl(builtIn);
BufferDefaults::context = context;
@@ -1245,7 +1245,7 @@ HWTEST_F(IoqCommandQueueHwBlitTest, givenSplitBcsCopyWhenEnqueueReadWithEventThe
}
HWTEST_F(IoqCommandQueueHwBlitTest, givenGpgpuCsrWhenEnqueueingSubsequentBlitsThenGpgpuCommandStreamIsNotObtained) {
if (pDevice->getCompilerProductHelper().isHeaplessModeEnabled()) {
if (pDevice->getCompilerProductHelper().isHeaplessModeEnabled(*defaultHwInfo)) {
GTEST_SKIP();
}

View File

@@ -171,7 +171,7 @@ TEST(CommandQueue, givenEnableTimestampWaitWhenCheckIsTimestampWaitEnabledThenRe
debugManager.flags.EnableTimestampWaitForQueues.set(-1);
const auto &productHelper = mockDevice->getProductHelper();
const auto &compilerProductHelper = mockDevice->getCompilerProductHelper();
bool heaplessEnabled = compilerProductHelper.isHeaplessModeEnabled();
bool heaplessEnabled = compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo);
auto enabled = productHelper.isTimestampWaitSupportedForQueues(heaplessEnabled);
@@ -2626,7 +2626,7 @@ HWTEST_F(KernelExecutionTypesTests, givenConcurrentKernelWhileDoingNonBlockedEnq
setUpImpl<CsrType>();
auto &compilerProductHelper = device->getCompilerProductHelper();
if (compilerProductHelper.isHeaplessModeEnabled()) {
if (compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo)) {
GTEST_SKIP();
}
auto mockCmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context.get(), device.get(), nullptr);
@@ -2648,7 +2648,7 @@ HWTEST_F(KernelExecutionTypesTests, givenKernelWithDifferentExecutionTypeWhileDo
setUpImpl<CsrType>();
auto &compilerProductHelper = device->getCompilerProductHelper();
if (compilerProductHelper.isHeaplessModeEnabled()) {
if (compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo)) {
GTEST_SKIP();
}
auto mockCmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context.get(), device.get(), nullptr);
@@ -2678,7 +2678,7 @@ HWTEST_F(KernelExecutionTypesTests, givenConcurrentKernelWhileDoingBlockedEnqueu
setUpImpl<CsrType>();
auto &compilerProductHelper = device->getCompilerProductHelper();
if (compilerProductHelper.isHeaplessModeEnabled()) {
if (compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo)) {
GTEST_SKIP();
}
auto mockCmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context.get(), device.get(), nullptr);
@@ -2996,7 +2996,7 @@ HWTEST_F(CommandQueueOnSpecificEngineTests, givenNotInitializedCcsOsContextWhenC
cl_command_queue_properties properties[5] = {};
auto &compilerProductHelper = context.getDevice(0)->getCompilerProductHelper();
auto heaplessModeEnabled = compilerProductHelper.isHeaplessModeEnabled();
auto heaplessModeEnabled = compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo);
auto heaplessStateInit = compilerProductHelper.isHeaplessStateInitEnabled(heaplessModeEnabled);
OsContext &osContext = *context.getDevice(0)->getEngine(aub_stream::ENGINE_CCS, EngineUsage::regular).osContext;

View File

@@ -71,7 +71,7 @@ struct XeHPAndLaterDispatchWalkerBasicFixture : public LinearStreamFixture {
}
auto &compilerProductHelper = device->getCompilerProductHelper();
heaplessEnabled = compilerProductHelper.isHeaplessModeEnabled();
heaplessEnabled = compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo);
}
DebugManagerStateRestore restore;
@@ -628,7 +628,7 @@ HWTEST2_F(XeHPAndLaterDispatchWalkerBasicTest, givenDebugVariableEnabledWhenEnqu
debugManager.flags.OverrideSystolicInComputeWalker.set(true);
auto &compilerProductHelper = device->getCompilerProductHelper();
auto heaplessEnabled = compilerProductHelper.isHeaplessModeEnabled();
auto heaplessEnabled = compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo);
if (heaplessEnabled) {
GTEST_SKIP();
}

View File

@@ -243,7 +243,7 @@ HWTEST_F(EnqueueCopyBufferTest, WhenCopyingBufferThenIndirectDataGetsAdded) {
EXPECT_TRUE(UnitTestHelper<FamilyType>::evaluateDshUsage(dshBefore, pDSH->getUsed(), kernelDescriptor, rootDeviceIndex));
auto crossThreadDatSize = kernel->getCrossThreadDataSize();
auto heaplessEnabled = pDevice->getCompilerProductHelper().isHeaplessModeEnabled();
auto heaplessEnabled = pDevice->getCompilerProductHelper().isHeaplessModeEnabled(*defaultHwInfo);
auto inlineDataSize = UnitTestHelper<FamilyType>::getInlineDataSize(heaplessEnabled);
bool crossThreadDataFitsInInlineData = (crossThreadDatSize <= inlineDataSize);

View File

@@ -221,7 +221,7 @@ HWTEST_P(MipMapCopyImageToBufferTest, GivenImageWithMipLevelNonZeroWhenCopyImage
const auto &compilerProductHelper = pCmdQ->getDevice().getCompilerProductHelper();
EBuiltInOps::Type builtInType = EBuiltInOps::copyImage3dToBuffer;
if (compilerProductHelper.isHeaplessModeEnabled()) {
if (compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo)) {
builtInType = EBuiltInOps::copyImage3dToBufferHeapless;
} else if (compilerProductHelper.isForceToStatelessRequired()) {
builtInType = EBuiltInOps::copyImage3dToBufferStateless;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -25,7 +25,7 @@ struct EnqueueFillBufferFixture : public CommandEnqueueFixture {
buffer = BufferHelper<>::create();
auto &compilerProductHelper = this->pDevice->getCompilerProductHelper();
isHeaplessEnabled = compilerProductHelper.isHeaplessModeEnabled();
isHeaplessEnabled = compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo);
}
void tearDown() {

View File

@@ -617,7 +617,7 @@ HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWhenClSetKernelExecInfoAlreadySe
}
auto &compilerProductHelper = pClDevice->getRootDeviceEnvironment().getHelper<CompilerProductHelper>();
if (compilerProductHelper.isHeaplessModeEnabled()) {
if (compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo)) {
GTEST_SKIP();
}
@@ -697,7 +697,7 @@ HEAPFUL_HWTEST_F(EnqueueHandlerTest, givenKernelUsingSyncBufferWhenEnqueuingKern
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
auto &compilerProductHelper = this->pDevice->getCompilerProductHelper();
if (compilerProductHelper.isHeaplessModeEnabled()) {
if (compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo)) {
GTEST_SKIP();
}

View File

@@ -1804,7 +1804,7 @@ struct PauseOnGpuTests : public EnqueueKernelTest {
debugPauseStateAddress = csr.getDebugPauseStateGPUAddress();
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
auto heapless = compilerProductHelper.isHeaplessModeEnabled();
auto heapless = compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo);
heaplessStateInit = compilerProductHelper.isHeaplessStateInitEnabled(heapless);
}

View File

@@ -42,7 +42,7 @@ struct EnqueueMapBufferTest : public ClDeviceFixture,
buffer = BufferHelper<BufferUseHostPtr<>>::create();
auto &compilerProductHelper = pClDevice->getCompilerProductHelper();
auto heapless = compilerProductHelper.isHeaplessModeEnabled();
auto heapless = compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo);
heaplessStateInit = compilerProductHelper.isHeaplessStateInitEnabled(heapless);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -54,7 +54,7 @@ struct EnqueueSvmMemCopyTest : public ClDeviceFixture,
ASSERT_NE(nullptr, dstSvmAlloc);
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
this->useHeapless = compilerProductHelper.isHeaplessModeEnabled();
this->useHeapless = compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo);
}
void TearDown() override {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -40,7 +40,7 @@ struct BaseEnqueueSvmMemFillFixture : public ClDeviceFixture,
ASSERT_NE(nullptr, svmAlloc);
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
this->useHeapless = compilerProductHelper.isHeaplessModeEnabled();
this->useHeapless = compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo);
}
void tearDown() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -41,7 +41,7 @@ class CommandStreamReceiverMock : public UltCommandStreamReceiver<FamilyType> {
this->pDevice = pDevice;
this->pClDevice = pDevice->getSpecializedDevice<ClDevice>();
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
auto heapless = compilerProductHelper.isHeaplessModeEnabled();
auto heapless = compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo);
this->heaplessStateInit = compilerProductHelper.isHeaplessStateInitEnabled(heapless);
}

View File

@@ -161,7 +161,7 @@ HWTEST_F(EnqueueWriteBufferTypeTest, WhenWritingBufferThenIndirectDataIsAdded) {
EnqueueWriteBufferHelper<>::enqueueWriteBuffer(pCmdQ, srcBuffer.get(), EnqueueWriteBufferTraits::blocking);
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
auto heaplessEnabled = compilerProductHelper.isHeaplessModeEnabled();
auto heaplessEnabled = compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo);
auto builtInType = adjustBuiltInType(heaplessEnabled, EBuiltInOps::copyBufferToBuffer);
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(builtInType,

View File

@@ -910,7 +910,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnoughMemoryOnlyForPreambleWh
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hardwareInfo, 0u));
auto &compilerProductHelper = mockDevice->getCompilerProductHelper();
if (compilerProductHelper.isHeaplessModeEnabled()) {
if (compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo)) {
GTEST_SKIP();
}
@@ -950,7 +950,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnoughMemoryOnlyForPreambleAn
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hardwareInfo, 0u));
auto &compilerProductHelper = mockDevice->getCompilerProductHelper();
if (compilerProductHelper.isHeaplessModeEnabled()) {
if (compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo)) {
GTEST_SKIP();
}

View File

@@ -997,7 +997,7 @@ HEAPFUL_HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenForced32BitAllocation
auto commandStreamReceiver = new MockCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
auto heaplessEnabled = compilerProductHelper.isHeaplessModeEnabled();
auto heaplessEnabled = compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo);
if (compilerProductHelper.isHeaplessStateInitEnabled(heaplessEnabled)) {
GTEST_SKIP();
}

View File

@@ -166,7 +166,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandStreamReceiverHwTestXeHPAndLater, givenScrat
GTEST_SKIP();
} else {
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
if (compilerProductHelper.isHeaplessModeEnabled()) {
if (compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo)) {
GTEST_SKIP();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -52,7 +52,7 @@ struct UltCommandStreamReceiverTest
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
auto heaplessEnabled = compilerProductHelper.isHeaplessModeEnabled();
auto heaplessEnabled = compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo);
this->heaplessStateEnabled = compilerProductHelper.isHeaplessStateInitEnabled(heaplessEnabled);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -703,7 +703,7 @@ TEST_F(DrmTests, givenDebuggingEnabledWhenDrmIsCreatedThenPerContextVMIsTrueGetV
auto drm = DrmWrap::createDrm(*mockRootDeviceEnvironment);
auto &compilerProductHelper = drm->getRootDeviceEnvironment().getHelper<CompilerProductHelper>();
bool heapless = compilerProductHelper.isHeaplessModeEnabled();
bool heapless = compilerProductHelper.isHeaplessModeEnabled(*drm->getRootDeviceEnvironment().getHardwareInfo());
ASSERT_NE(drm, nullptr);
if (drm->isVmBindAvailable()) {
@@ -763,7 +763,7 @@ TEST_F(DrmTests, givenEnabledDebuggingAndVmBindNotAvailableWhenDrmIsCreatedThenP
std::string errStr = ::testing::internal::GetCapturedStderr();
auto &compilerProductHelper = drm->getRootDeviceEnvironment().getHelper<CompilerProductHelper>();
bool heapless = compilerProductHelper.isHeaplessModeEnabled();
bool heapless = compilerProductHelper.isHeaplessModeEnabled(*drm->getRootDeviceEnvironment().getHardwareInfo());
if (heapless) {
EXPECT_FALSE(hasSubstr(errStr, std::string("WARNING: Debugging not supported\n")));

View File

@@ -33,7 +33,7 @@ struct MigrationControllerTests : public ::testing::Test {
memoryManager->localMemorySupported[rootDeviceIndex] = true;
}
auto &compilerProductHelper = context.getDevice(0)->getCompilerProductHelper();
auto heapless = compilerProductHelper.isHeaplessModeEnabled();
auto heapless = compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo);
heaplessStateInit = compilerProductHelper.isHeaplessStateInitEnabled(heapless);
}
void TearDown() override {

View File

@@ -1680,7 +1680,7 @@ TEST_F(ProgramTests, WhenCreatingProgramThenBindlessIsEnabledOnlyIfDebugFlagIsEn
using namespace testing;
DebugManagerStateRestore restorer;
if (!pDevice->getCompilerProductHelper().isHeaplessModeEnabled()) {
if (!pDevice->getCompilerProductHelper().isHeaplessModeEnabled(*defaultHwInfo)) {
debugManager.flags.UseBindlessMode.set(0);
MockProgram programNoBindless(pContext, false, toClDeviceVector(*pClDevice));
auto internalOptionsNoBindless = programNoBindless.getInternalOptions();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -935,7 +935,7 @@ TEST_F(GlSharingTests, givenClGLBufferWhenMapAndUnmapBufferIsCalledThenCopyOnGpu
gfxAllocation->setGmm(new MockGmm(pClDevice->getGmmHelper()), handleId);
}
auto &compilerProductHelper = pClDevice->getCompilerProductHelper();
auto heapless = compilerProductHelper.isHeaplessModeEnabled();
auto heapless = compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo);
auto heaplessStateInit = compilerProductHelper.isHeaplessStateInitEnabled(heapless);
auto commandQueue = CommandQueue::create(&context, pClDevice, 0, false, retVal);