mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 19:32:25 +08:00
Add debug flag to override gpu address space
Change-Id: Ifce09cf2b0f1935ce15f1a718cff36b0c44848ca Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
559c67aa7c
commit
73697b7ab4
@@ -41,6 +41,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, EnableExperimentalCommandBuffer, 0, "Enables inj
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, OverrideStatelessMocsIndex, -1, "-1: feature inactive, >=0 : following MOCS index will be programmed for stateless accesses in state base address")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, CFEFusedEUDispatch, -1, "Set Fused EU dispatch in FrontEnd State command. -1 - do not set")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ForceAuxTranslationMode, -1, "-1: Default, 0: Builtin, 1: Blit")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, OverrideGpuAddressSpace, -1, "-1: Default, !=-1: GPU address space range in bits")
|
||||
DECLARE_DEBUG_VARIABLE(bool, EnableDebugBreak, true, "Enable DEBUG_BREAKs")
|
||||
DECLARE_DEBUG_VARIABLE(bool, FlushAllCaches, false, "pipe controls between enqueues flush all possible caches")
|
||||
DECLARE_DEBUG_VARIABLE(bool, MakeEachEnqueueBlocking, false, "equivalent of finish after each enqueue")
|
||||
|
||||
@@ -142,6 +142,11 @@ bool Platform::initialize() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (DebugManager.flags.OverrideGpuAddressSpace.get() != -1) {
|
||||
executionEnvironment->getMutableHardwareInfo()->capabilityTable.gpuAddressSpace =
|
||||
maxNBitValue(static_cast<uint64_t>(DebugManager.flags.OverrideGpuAddressSpace.get()));
|
||||
}
|
||||
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
|
||||
DEBUG_BREAK_IF(this->platformInfo);
|
||||
|
||||
@@ -84,6 +84,16 @@ TEST_F(PlatformTest, getDevices) {
|
||||
EXPECT_NE(nullptr, allDevices);
|
||||
}
|
||||
|
||||
TEST_F(PlatformTest, givenDebugFlagSetWhenInitializingPlatformThenOverrideGpuAddressSpace) {
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.OverrideGpuAddressSpace.set(12);
|
||||
|
||||
bool status = pPlatform->initialize();
|
||||
EXPECT_TRUE(status);
|
||||
|
||||
EXPECT_EQ(maxNBitValue(12), pPlatform->peekExecutionEnvironment()->getHardwareInfo()->capabilityTable.gpuAddressSpace);
|
||||
}
|
||||
|
||||
TEST_F(PlatformTest, PlatformgetAsCompilerEnabledExtensionsString) {
|
||||
std::string compilerExtensions = pPlatform->peekCompilerExtensions();
|
||||
EXPECT_EQ(std::string(""), compilerExtensions);
|
||||
|
||||
@@ -126,3 +126,4 @@ ForceSamplerLowFilteringPrecision = 0
|
||||
UseBindlessBuffers = 0
|
||||
UseBindlessImages = 0
|
||||
PrintProgramBinaryProcessingTime = 0
|
||||
OverrideGpuAddressSpace = -1
|
||||
Reference in New Issue
Block a user