feature: additional checkers to enable feature
Resolves: NEO-13973 Signed-off-by: Damian Tomczak <damian.tomczak@intel.com>
This commit is contained in:
parent
4bc13fa0dc
commit
0243004907
|
@ -10,6 +10,7 @@
|
|||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/api_specific_config.h"
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
|
||||
#include "level_zero/core/source/compiler_interface/l0_reg_path.h"
|
||||
|
@ -33,6 +34,10 @@ bool ApiSpecificConfig::getGlobalBindlessHeapConfiguration(const ReleaseHelper *
|
|||
}
|
||||
|
||||
bool ApiSpecificConfig::getBindlessMode(const Device &device) {
|
||||
if (device.getCompilerProductHelper().isForceBindlessRequired()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (debugManager.flags.UseBindlessMode.get() != -1) {
|
||||
return debugManager.flags.UseBindlessMode.get();
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include "shared/source/command_container/implicit_scaling.h"
|
||||
#include "shared/source/helpers/api_specific_config.h"
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/mocks/mock_ail_configuration.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
|
@ -113,7 +114,7 @@ TEST(ApiSpecificConfigL0Tests, WhenCheckingIfBindlessAddressingIsEnabledThenRetu
|
|||
EXPECT_TRUE(ApiSpecificConfig::getBindlessMode(mockDevice));
|
||||
|
||||
mockAilConfigurationHelper.setDisableBindlessAddressing(true);
|
||||
EXPECT_FALSE(ApiSpecificConfig::getBindlessMode(mockDevice));
|
||||
EXPECT_EQ(mockDevice.getCompilerProductHelper().isHeaplessModeEnabled(), ApiSpecificConfig::getBindlessMode(mockDevice));
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
|
|
@ -3887,7 +3887,7 @@ TEST_F(ModuleTest, givenInternalOptionsWhenBindlessDisabledThenBindlesOptionsNot
|
|||
|
||||
module->createBuildOptions("", buildOptions, internalBuildOptions);
|
||||
|
||||
EXPECT_FALSE(NEO::CompilerOptions::contains(internalBuildOptions, NEO::CompilerOptions::bindlessMode));
|
||||
EXPECT_EQ(device->getCompilerProductHelper().isHeaplessModeEnabled(), NEO::CompilerOptions::contains(internalBuildOptions, NEO::CompilerOptions::bindlessMode));
|
||||
}
|
||||
|
||||
TEST_F(ModuleTest, givenSrcOptLevelInSrcNamesWhenMovingBuildOptionsThenOptionIsRemovedFromSrcNamesAndTranslatedOptionsStoredInDstNames) {
|
||||
|
|
|
@ -6,7 +6,10 @@
|
|||
*/
|
||||
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/helpers/api_specific_config.h"
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
|
||||
#include "opencl/source/os_interface/ocl_reg_path.h"
|
||||
|
||||
|
@ -25,6 +28,10 @@ bool ApiSpecificConfig::getGlobalBindlessHeapConfiguration(const ReleaseHelper *
|
|||
}
|
||||
|
||||
bool ApiSpecificConfig::getBindlessMode(const Device &device) {
|
||||
if (device.getCompilerProductHelper().isForceBindlessRequired()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (debugManager.flags.UseBindlessMode.get() != -1) {
|
||||
return debugManager.flags.UseBindlessMode.get();
|
||||
} else {
|
||||
|
|
|
@ -80,7 +80,7 @@ std::string Program::getInternalOptions() const {
|
|||
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::greaterThan4gbBuffersRequired);
|
||||
}
|
||||
|
||||
if (debugManager.flags.UseBindlessMode.get() == 1) {
|
||||
if (NEO::ApiSpecificConfig::getBindlessMode(pClDevice->getDevice())) {
|
||||
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::bindlessMode);
|
||||
}
|
||||
|
||||
|
|
|
@ -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::copyBufferToBuffer, BuiltinCode::ECodeType::any, *pDevice);
|
||||
BuiltinCode code = builtinsLib->getBuiltinCode(EBuiltInOps::adjustBuiltinType<EBuiltInOps::copyBufferToBuffer>(false, pDevice->getCompilerProductHelper().isHeaplessModeEnabled()), 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::copyBufferToBuffer, BuiltinCode::ECodeType::binary, *pDevice);
|
||||
BuiltinCode code = builtinsLib->getBuiltinCode(EBuiltInOps::adjustBuiltinType<EBuiltInOps::copyBufferToBuffer>(false, pDevice->getCompilerProductHelper().isHeaplessModeEnabled()), 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::copyBufferToBuffer, BuiltinCode::ECodeType::binary, *pDevice);
|
||||
const BuiltinCode bc = builtinsLib->getBuiltinCode(EBuiltInOps::adjustBuiltinType<EBuiltInOps::copyBufferToBuffer>(false, pDevice->getCompilerProductHelper().isHeaplessModeEnabled()), 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::copyBufferToBuffer, BuiltinCode::ECodeType::binary, *pDevice);
|
||||
BuiltinCode code = builtinsLib->getBuiltinCode(EBuiltInOps::adjustBuiltinType<EBuiltInOps::copyBufferToBuffer>(false, pDevice->getCompilerProductHelper().isHeaplessModeEnabled()), BuiltinCode::ECodeType::binary, *pDevice);
|
||||
EXPECT_EQ(BuiltinCode::ECodeType::binary, code.type);
|
||||
EXPECT_NE(0u, code.resource.size());
|
||||
EXPECT_EQ(pDevice, code.targetDevice);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -22,6 +22,8 @@ struct CreateCommandStreamReceiverTest : public ::testing::TestWithParam<Command
|
|||
|
||||
HWTEST_P(CreateCommandStreamReceiverTest, givenCreateCommandStreamWhenCsrIsSetToValidTypeThenTheFuntionReturnsCommandStreamReceiver) {
|
||||
DebugManagerStateRestore stateRestorer;
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
|
||||
HardwareInfo *hwInfo = nullptr;
|
||||
ExecutionEnvironment *executionEnvironment = getExecutionEnvironmentImpl(hwInfo, 1);
|
||||
ASSERT_NE(nullptr, executionEnvironment->memoryManager.get());
|
||||
|
|
|
@ -1680,21 +1680,18 @@ TEST_F(ProgramTests, WhenCreatingProgramThenBindlessIsEnabledOnlyIfDebugFlagIsEn
|
|||
using namespace testing;
|
||||
DebugManagerStateRestore restorer;
|
||||
|
||||
{
|
||||
|
||||
if (!pDevice->getCompilerProductHelper().isHeaplessModeEnabled()) {
|
||||
debugManager.flags.UseBindlessMode.set(0);
|
||||
MockProgram programNoBindless(pContext, false, toClDeviceVector(*pClDevice));
|
||||
auto internalOptionsNoBindless = programNoBindless.getInternalOptions();
|
||||
EXPECT_FALSE(CompilerOptions::contains(internalOptionsNoBindless, CompilerOptions::bindlessMode)) << internalOptionsNoBindless;
|
||||
}
|
||||
{
|
||||
|
||||
debugManager.flags.UseBindlessMode.set(1);
|
||||
MockProgram programBindless(pContext, false, toClDeviceVector(*pClDevice));
|
||||
auto internalOptionsBindless = programBindless.getInternalOptions();
|
||||
EXPECT_TRUE(CompilerOptions::contains(internalOptionsBindless, CompilerOptions::bindlessMode)) << internalOptionsBindless;
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(ProgramTests, GivenForce32BitAddressesWhenProgramIsCreatedThenGreaterThan4gbBuffersRequiredIsCorrectlySet) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
|
|
|
@ -86,6 +86,7 @@ class CompilerProductHelper {
|
|||
virtual void getKernelFp64AtomicCapabilities(uint32_t &fp64Caps) const = 0;
|
||||
virtual void getKernelCapabilitiesExtra(const ReleaseHelper *releaseHelper, uint32_t &extraCaps) const = 0;
|
||||
virtual bool isBindlessAddressingDisabled(const ReleaseHelper *releaseHelper) const = 0;
|
||||
virtual bool isForceBindlessRequired() const = 0;
|
||||
virtual const char *getCustomIgcLibraryName() const = 0;
|
||||
virtual const char *getFinalizerLibraryName() const = 0;
|
||||
|
||||
|
@ -139,6 +140,7 @@ class CompilerProductHelperHw : public CompilerProductHelper {
|
|||
void getKernelFp64AtomicCapabilities(uint32_t &fp64Caps) const override;
|
||||
void getKernelCapabilitiesExtra(const ReleaseHelper *releaseHelper, uint32_t &extraCaps) const override;
|
||||
bool isBindlessAddressingDisabled(const ReleaseHelper *releaseHelper) const override;
|
||||
bool isForceBindlessRequired() const override;
|
||||
const char *getCustomIgcLibraryName() const override;
|
||||
const char *getFinalizerLibraryName() const override;
|
||||
|
||||
|
|
|
@ -306,6 +306,11 @@ bool CompilerProductHelperHw<gfxProduct>::isBindlessAddressingDisabled(const Rel
|
|||
return true;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool CompilerProductHelperHw<gfxProduct>::isForceBindlessRequired() const {
|
||||
return this->isHeaplessModeEnabled();
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
const char *CompilerProductHelperHw<gfxProduct>::getCustomIgcLibraryName() const {
|
||||
return nullptr;
|
||||
|
|
|
@ -61,6 +61,7 @@ class MockCompilerProductHelper : public CompilerProductHelper {
|
|||
ADDMETHOD_CONST_NOBASE_VOIDRETURN(getKernelFp64AtomicCapabilities, (uint32_t & fp64Caps));
|
||||
ADDMETHOD_CONST_NOBASE_VOIDRETURN(getKernelCapabilitiesExtra, (const ReleaseHelper *releaseHelper, uint32_t &extraCaps));
|
||||
ADDMETHOD_CONST_NOBASE(isBindlessAddressingDisabled, bool, false, (const ReleaseHelper *releaseHelper));
|
||||
ADDMETHOD_CONST_NOBASE(isForceBindlessRequired, bool, false, ());
|
||||
ADDMETHOD_CONST_NOBASE(getProductConfigFromHwInfo, uint32_t, 0, (const HardwareInfo &hwInfo));
|
||||
ADDMETHOD_CONST_NOBASE(getCustomIgcLibraryName, const char *, nullptr, ());
|
||||
ADDMETHOD_CONST_NOBASE(getFinalizerLibraryName, const char *, nullptr, ());
|
||||
|
|
|
@ -38,8 +38,8 @@ class DrmCommandStreamTest : public ::testing::Test {
|
|||
public:
|
||||
template <typename GfxFamily>
|
||||
void setUpT() {
|
||||
|
||||
// make sure this is disabled, we don't want to test this now
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
debugManager.flags.EnableForcePin.set(false);
|
||||
|
||||
mock = new DrmMock(mockFd, *executionEnvironment.rootDeviceEnvironments[0]);
|
||||
|
@ -127,6 +127,7 @@ class DrmCommandStreamEnhancedTemplate : public ::testing::Test {
|
|||
this->dbgState = std::make_unique<DebugManagerStateRestore>();
|
||||
// make sure this is disabled, we don't want to test this now
|
||||
debugManager.flags.EnableForcePin.set(false);
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
|
||||
mock = DrmType::create(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]).release();
|
||||
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->osInterface = std::make_unique<OSInterface>();
|
||||
|
|
|
@ -29,6 +29,7 @@ using namespace NEO;
|
|||
|
||||
struct DeviceCommandStreamLeaksTest : ::testing::Test {
|
||||
void SetUp() override {
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
HardwareInfo *hwInfo = nullptr;
|
||||
executionEnvironment = getExecutionEnvironmentImpl(hwInfo, 1);
|
||||
executionEnvironment->incRefInternal();
|
||||
|
@ -40,9 +41,12 @@ struct DeviceCommandStreamLeaksTest : ::testing::Test {
|
|||
}
|
||||
|
||||
ExecutionEnvironment *executionEnvironment;
|
||||
DebugManagerStateRestore dbgState;
|
||||
};
|
||||
|
||||
HWTEST_F(DeviceCommandStreamLeaksTest, WhenCreatingDeviceCsrThenValidPointerIsReturned) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0, 1));
|
||||
DrmMockSuccess mockDrm(mockFd, *executionEnvironment->rootDeviceEnvironments[0]);
|
||||
EXPECT_NE(nullptr, ptr);
|
||||
|
@ -62,6 +66,8 @@ HWTEST_F(DeviceCommandStreamLeaksTest, givenDefaultDrmCsrWithAubDumWhenItIsCreat
|
|||
}
|
||||
|
||||
HWTEST_F(DeviceCommandStreamLeaksTest, givenDefaultDrmCsrWhenOsInterfaceIsNullptrThenValidateDrm) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0, 1));
|
||||
auto drmCsr = (DrmCommandStreamReceiver<FamilyType> *)ptr.get();
|
||||
EXPECT_NE(nullptr, executionEnvironment->rootDeviceEnvironments[0]->osInterface);
|
||||
|
@ -89,6 +95,7 @@ HWTEST_F(DeviceCommandStreamLeaksTest, givenDisabledGemCloseWorkerWhenCsrIsCreat
|
|||
HWTEST_F(DeviceCommandStreamLeaksTest, givenEnabledGemCloseWorkerWhenCsrIsCreatedThenGemCloseWorkerActiveModeIsSelected) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.EnableGemCloseWorker.set(1u);
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
|
||||
executionEnvironment->memoryManager = DrmMemoryManager::create(*executionEnvironment);
|
||||
|
||||
|
@ -103,6 +110,9 @@ HWTEST_F(DeviceCommandStreamLeaksTest, givenEnabledGemCloseWorkerWhenCsrIsCreate
|
|||
}
|
||||
|
||||
HWTEST_F(DeviceCommandStreamLeaksTest, givenDefaultGemCloseWorkerWhenCsrIsCreatedThenGemCloseWorkerActiveModeIsSelected) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
|
||||
executionEnvironment->memoryManager = DrmMemoryManager::create(*executionEnvironment);
|
||||
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0, 1));
|
||||
auto osContext = OsContext::create(executionEnvironment->rootDeviceEnvironments[0]->osInterface.get(), 0, 0,
|
||||
|
|
|
@ -40,6 +40,7 @@ struct DrmCommandStreamMemExecTest : public DrmCommandStreamEnhancedTemplate<Drm
|
|||
HWTEST_F(DrmCommandStreamMMTest, GivenForcePinThenMemoryManagerCreatesPinBb) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
debugManager.flags.EnableForcePin.set(true);
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
auto drm = DrmMockCustom::create(*executionEnvironment.rootDeviceEnvironments[0]).release();
|
||||
|
@ -60,6 +61,7 @@ HWTEST_F(DrmCommandStreamMMTest, GivenForcePinThenMemoryManagerCreatesPinBb) {
|
|||
HWTEST_F(DrmCommandStreamMMTest, givenForcePinDisabledWhenMemoryManagerIsCreatedThenPinBBIsCreated) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
debugManager.flags.EnableForcePin.set(false);
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
auto drm = DrmMockCustom::create(*executionEnvironment.rootDeviceEnvironments[0]).release();
|
||||
|
|
|
@ -26,6 +26,8 @@ extern ApiSpecificConfig::ApiType apiTypeForUlts;
|
|||
using namespace NEO;
|
||||
|
||||
HWTEST_TEMPLATED_F(DrmCommandStreamTest, givenL0ApiConfigWhenCreatingDrmCsrThenEnableImmediateDispatch) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
VariableBackup<ApiSpecificConfig::ApiType> backup(&apiTypeForUlts, ApiSpecificConfig::L0);
|
||||
MockDrmCsr<FamilyType> csr(executionEnvironment, 0, 1);
|
||||
EXPECT_EQ(DispatchMode::immediateDispatch, csr.dispatchMode);
|
||||
|
@ -85,6 +87,9 @@ HWTEST_TEMPLATED_F(DrmCommandStreamTest, givenNoTagAddressWhenGettingCompletionA
|
|||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(DrmCommandStreamTest, GivenExecBufferErrorWhenFlushInternalThenProperErrorIsReturned) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
|
||||
mock->execBufferResult = -1;
|
||||
mock->baseErrno = false;
|
||||
mock->errnoRetVal = EWOULDBLOCK;
|
||||
|
@ -1356,6 +1361,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
|
|||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.EnableUserFenceForCompletionWait.set(0);
|
||||
debugManager.flags.OverrideNotifyEnableForTagUpdatePostSync.set(1);
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
|
||||
mock->isVmBindAvailableCall.callParent = false;
|
||||
mock->isVmBindAvailableCall.returnValue = true;
|
||||
|
|
|
@ -409,6 +409,8 @@ HWTEST_TEMPLATED_F(DrmCommandStreamTest, GivenCheckFlagsWhenFlushingThenSucceeds
|
|||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(DrmCommandStreamTest, GivenCheckDrmFreeWhenFlushingThenSucceeds) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
mock->returnHandle = 17;
|
||||
|
||||
auto &cs = csr->getCS();
|
||||
|
|
|
@ -375,6 +375,8 @@ class DrmCommandStreamForceTileTest : public ::testing::Test {
|
|||
};
|
||||
template <typename GfxFamily>
|
||||
void setUpT() {
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
|
||||
mock = new DrmMock(mockFd, *executionEnvironment.rootDeviceEnvironments[0]);
|
||||
|
||||
auto hwInfo = executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
|
@ -423,6 +425,7 @@ class DrmCommandStreamForceTileTest : public ::testing::Test {
|
|||
const uint32_t rootDeviceIndex = 0u;
|
||||
const uint32_t expectedHandleId = 1u;
|
||||
|
||||
DebugManagerStateRestore restorer;
|
||||
CommandStreamReceiver *csr = nullptr;
|
||||
DrmMemoryManager *memoryManager = nullptr;
|
||||
DrmMock *mock = nullptr;
|
||||
|
@ -477,6 +480,8 @@ HWTEST_TEMPLATED_F(DrmCommandStreamTest, givenPrintIndicesEnabledWhenFlushThenPr
|
|||
|
||||
struct DrmImplicitScalingCommandStreamTest : ::testing::Test {
|
||||
void SetUp() override {
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
|
||||
executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
|
||||
|
@ -525,9 +530,13 @@ struct DrmImplicitScalingCommandStreamTest : ::testing::Test {
|
|||
std::unique_ptr<OsContextLinux> osContext;
|
||||
DrmMemoryManager *memoryManager;
|
||||
std::unique_ptr<HardwareInfo> hwInfo;
|
||||
DebugManagerStateRestore restorer;
|
||||
};
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, DrmImplicitScalingCommandStreamTest, givenTwoTilesWhenFlushIsCalledThenExecIsExecutedOnEveryTile) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
|
||||
auto csr = createCsr<FamilyType>();
|
||||
|
||||
auto size = 1024u;
|
||||
|
@ -627,6 +636,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DrmImplicitScalingCommandStreamTest, whenForceExecu
|
|||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceExecutionTile.set(1);
|
||||
debugManager.flags.EnableWalkerPartition.set(0);
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
|
||||
struct MockCsr : DrmCommandStreamReceiver<FamilyType> {
|
||||
using DrmCommandStreamReceiver<FamilyType>::DrmCommandStreamReceiver;
|
||||
|
@ -668,6 +678,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DrmImplicitScalingCommandStreamTest, whenForceExecu
|
|||
HWCMDTEST_F(IGFX_XE_HP_CORE, DrmImplicitScalingCommandStreamTest, givenDisabledImplicitScalingWhenFlushingThenUseOnlyOneContext) {
|
||||
DebugManagerStateRestore debugRestore{};
|
||||
debugManager.flags.EnableWalkerPartition.set(0);
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
|
||||
struct MockCsr : DrmCommandStreamReceiver<FamilyType> {
|
||||
using DrmCommandStreamReceiver<FamilyType>::DrmCommandStreamReceiver;
|
||||
|
@ -706,6 +717,8 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DrmImplicitScalingCommandStreamTest, givenDisabledI
|
|||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, DrmImplicitScalingCommandStreamTest, givenMultiTileCsrWhenFlushThenVmHandleIdEqualsTileId) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
|
||||
struct MockCsr : DrmCommandStreamReceiver<FamilyType> {
|
||||
using DrmCommandStreamReceiver<FamilyType>::DrmCommandStreamReceiver;
|
||||
int exec(const BatchBuffer &batchBuffer, uint32_t vmHandleId, uint32_t drmContextId, uint32_t index) override {
|
||||
|
|
Loading…
Reference in New Issue