mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 05:24:02 +08:00
feature: additional checkers to enable feature
Resolves: NEO-13973 Signed-off-by: Damian Tomczak <damian.tomczak@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
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) {
|
||||
|
||||
Reference in New Issue
Block a user