Improve debug flag to force aux translation

Change-Id: Ie17d3dc850de657144c7ba8b9bb7af85d77d4655
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2020-07-02 12:53:22 +02:00
committed by sys_ocldev
parent 383025d1bb
commit 3f64cc0e4d
4 changed files with 12 additions and 13 deletions

View File

@ -375,10 +375,10 @@ cl_int Kernel::initialize() {
}
}
if (DebugManager.flags.ForceAuxTranslationEnabled.get() != -1) {
auxTranslationRequired &= !!DebugManager.flags.ForceAuxTranslationEnabled.get();
} else {
auxTranslationRequired &= hwHelper.requiresAuxResolves();
if (DebugManager.flags.DisableAuxTranslation.get()) {
auxTranslationRequired = false;
}
if (usingImages && !usingBuffers) {

View File

@ -2707,7 +2707,7 @@ TEST(KernelTest, givenKernelWithKernelInfoWith64bitPointerSizeThenReport64bit) {
TEST(KernelTest, givenFtrRenderCompressedBuffersWhenInitializingArgsWithNonStatefulAccessThenMarkKernelForAuxTranslation) {
DebugManagerStateRestore restore;
DebugManager.flags.DisableAuxTranslation.set(false);
DebugManager.flags.ForceAuxTranslationEnabled.set(1);
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
auto hwInfo = device->getRootDeviceEnvironment().getMutableHardwareInfo();
auto &capabilityTable = hwInfo->capabilityTable;
@ -2730,14 +2730,13 @@ TEST(KernelTest, givenFtrRenderCompressedBuffersWhenInitializingArgsWithNonState
capabilityTable.ftrRenderCompressedBuffers = true;
kernel.mockKernel->initialize();
if (HwHelper::get(hwInfo->platform.eRenderCoreFamily).requiresAuxResolves()) {
EXPECT_TRUE(kernel.mockKernel->isAuxTranslationRequired());
} else {
EXPECT_FALSE(kernel.mockKernel->isAuxTranslationRequired());
}
DebugManager.flags.DisableAuxTranslation.set(true);
DebugManager.flags.ForceAuxTranslationEnabled.set(-1);
kernel.mockKernel->initialize();
EXPECT_EQ(HwHelper::get(hwInfo->platform.eRenderCoreFamily).requiresAuxResolves(), kernel.mockKernel->isAuxTranslationRequired());
DebugManager.flags.ForceAuxTranslationEnabled.set(0);
kernel.mockKernel->initialize();
EXPECT_FALSE(kernel.mockKernel->isAuxTranslationRequired());
}

View File

@ -46,7 +46,7 @@ RebuildPrecompiledKernels = 0
LoopAtDriverInit = 0
DoNotRegisterTrimCallback = 0
OverrideInvalidEngineWithDefault = 0
DisableAuxTranslation = 0
ForceAuxTranslationEnabled = -1
DisableTimestampPacketOptimizations = 0
DisableCachingForStatefulBufferAccess = 0
PrintDebugSettings = 0

View File

@ -34,10 +34,10 @@ DECLARE_DEBUG_VARIABLE(bool, AUBDumpAllocsOnEnqueueReadOnly, false, "Force dumpi
DECLARE_DEBUG_VARIABLE(bool, AUBDumpForceAllToLocalMemory, false, "Force placing every allocation in local memory address space")
/*DEBUG FLAGS*/
DECLARE_DEBUG_VARIABLE(bool, DisableAuxTranslation, false, "Disable aux translation when required by Kernel.")
DECLARE_DEBUG_VARIABLE(bool, DisableTimestampPacketOptimizations, false, "Allocate new allocation per node + dont reuse old nodes")
DECLARE_DEBUG_VARIABLE(bool, DisableCachingForStatefulBufferAccess, false, "Disable caching for stateful buffer access")
DECLARE_DEBUG_VARIABLE(std::string, ForceDeviceId, std::string("unk"), "DeviceId selected for testing")
DECLARE_DEBUG_VARIABLE(int32_t, ForceAuxTranslationEnabled, -1, "-1: default, 0: disabled, 1: enabled")
DECLARE_DEBUG_VARIABLE(int32_t, SchedulerSimulationReturnInstance, 0, "prints execution model related debug information")
DECLARE_DEBUG_VARIABLE(int32_t, SchedulerGWS, 0, "Forces gws of scheduler kernel, only multiple of 24 allowed or 0 - default selected")
DECLARE_DEBUG_VARIABLE(int32_t, EnableExperimentalCommandBuffer, 0, "Enables injection of experimental command buffer")