refactor: improve debug flag to override bcs mocs
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
parent
8708963c4f
commit
f31fafb1e2
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -164,7 +164,8 @@ XE_HPC_CORETEST_F(BlitXeHpcCoreTests, givenTransferLargerThenHalfOfL3WhenItIsPro
|
|||
|
||||
XE_HPC_CORETEST_F(BlitXeHpcCoreTests, givenBufferWhenProgrammingBltCommandThenSetMocsToValueOfDebugKey) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.OverrideBlitterMocs.set(0u);
|
||||
uint32_t expectedMocs = 0;
|
||||
debugManager.flags.OverrideBlitterMocs.set(expectedMocs);
|
||||
using MEM_COPY = typename FamilyType::MEM_COPY;
|
||||
MockGraphicsAllocation clearColorAlloc;
|
||||
|
||||
|
@ -187,8 +188,6 @@ XE_HPC_CORETEST_F(BlitXeHpcCoreTests, givenBufferWhenProgrammingBltCommandThenSe
|
|||
ASSERT_NE(hwParser.cmdList.end(), itorBltCmd);
|
||||
MEM_COPY *bltCmd = (MEM_COPY *)*itorBltCmd;
|
||||
|
||||
auto expectedMocs = clDevice->getGmmHelper()->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED);
|
||||
|
||||
EXPECT_EQ(expectedMocs, bltCmd->getDestinationMOCS());
|
||||
EXPECT_EQ(expectedMocs, bltCmd->getSourceMOCS());
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -84,7 +84,8 @@ XE_HPG_CORETEST_F(BlitXeHpgCoreTests, givenBufferWhenProgrammingBltCommandThenSe
|
|||
|
||||
XE_HPG_CORETEST_F(BlitXeHpgCoreTests, givenBufferWhenProgrammingBltCommandThenSetMocsToValueOfDebugKey) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.OverrideBlitterMocs.set(0u);
|
||||
uint32_t expectedMocs = 0;
|
||||
debugManager.flags.OverrideBlitterMocs.set(expectedMocs);
|
||||
using XY_COPY_BLT = typename FamilyType::XY_COPY_BLT;
|
||||
|
||||
auto &bcsEngine = clDevice->getEngine(aub_stream::EngineType::ENGINE_BCS, EngineUsage::regular);
|
||||
|
@ -106,8 +107,6 @@ XE_HPG_CORETEST_F(BlitXeHpgCoreTests, givenBufferWhenProgrammingBltCommandThenSe
|
|||
auto bltCmd = genCmdCast<XY_COPY_BLT *>(*(hwParser.cmdList.begin()));
|
||||
EXPECT_NE(nullptr, bltCmd);
|
||||
|
||||
auto expectedMocs = clDevice->getGmmHelper()->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED);
|
||||
|
||||
EXPECT_EQ(expectedMocs, bltCmd->getDestinationMOCS());
|
||||
EXPECT_EQ(expectedMocs, bltCmd->getSourceMOCS());
|
||||
}
|
||||
|
|
|
@ -166,7 +166,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, EnableHwGenerationLocalIds, -1, "-1: default, 0:
|
|||
DECLARE_DEBUG_VARIABLE(int32_t, WalkerPartitionPreferHighestDimension, -1, "-1: default, 0: prefer biggest dimension, 1: prefer Z over Y over X if they divide partition count evenly")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, SetMinimalPartitionSize, -1, "-1 default value set to 512 workgroups, 0 - disabled, >0 - minimal partition size in workgroups (should be power of 2)")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, OverrideBlitterTargetMemory, -1, "-1:default 0: overwrites to System 1: overwrites to Local")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, OverrideBlitterMocs, -1, "-1: default, 0: Uncached, 1: Cached")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, OverrideBlitterMocs, -1, "-1: default, >=0 Override MOCS value")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, OverridePostSyncMocs, -1, "-1: default, >=0 Override post sync mocs with value")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, EnableImmediateVmBindExt, -1, "Use immediate bind extension to a new residency model on Linux (requires kernel support), -1: default (enabled with direct submission), 0: disabled, 1: enabled")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ForceExecutionTile, -1, "-1: default, 0+: given tile is chosen as submission, must be used with EnableWalkerPartition = 0.")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -60,8 +60,8 @@ void BlitCommandsHelper<GfxFamily>::appendBlitCommandsForFillBuffer(NEO::Graphic
|
|||
appendExtraMemoryProperties(blitCmd, rootDeviceEnvironment);
|
||||
|
||||
auto mocs = rootDeviceEnvironment.getGmmHelper()->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED);
|
||||
if (debugManager.flags.OverrideBlitterMocs.get() == 1) {
|
||||
mocs = rootDeviceEnvironment.getGmmHelper()->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER);
|
||||
if (debugManager.flags.OverrideBlitterMocs.get() != -1) {
|
||||
mocs = static_cast<uint32_t>(debugManager.flags.OverrideBlitterMocs.get());
|
||||
}
|
||||
|
||||
blitCmd.setDestinationMOCS(mocs);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -92,10 +92,8 @@ void BlitCommandsHelper<Family>::appendBlitCommandsMemCopy(const BlitProperties
|
|||
|
||||
auto mocs = rootDeviceEnvironment.getGmmHelper()->getMOCS(cachePolicy);
|
||||
|
||||
if (debugManager.flags.OverrideBlitterMocs.get() == 0) {
|
||||
mocs = rootDeviceEnvironment.getGmmHelper()->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED);
|
||||
} else if (debugManager.flags.OverrideBlitterMocs.get() == 1) {
|
||||
mocs = rootDeviceEnvironment.getGmmHelper()->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER);
|
||||
if (debugManager.flags.OverrideBlitterMocs.get() != -1) {
|
||||
mocs = static_cast<uint32_t>(debugManager.flags.OverrideBlitterMocs.get());
|
||||
}
|
||||
|
||||
blitCmd.setDestinationMOCS(mocs);
|
||||
|
@ -144,8 +142,8 @@ void BlitCommandsHelper<Family>::dispatchBlitMemoryFill<1>(NEO::GraphicsAllocati
|
|||
auto &rootDeviceEnvironment = *waArgs.rootDeviceEnvironment;
|
||||
|
||||
auto mocs = rootDeviceEnvironment.getGmmHelper()->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER);
|
||||
if (debugManager.flags.OverrideBlitterMocs.get() == 0) {
|
||||
mocs = rootDeviceEnvironment.getGmmHelper()->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED);
|
||||
if (debugManager.flags.OverrideBlitterMocs.get() != -1) {
|
||||
mocs = static_cast<uint32_t>(debugManager.flags.OverrideBlitterMocs.get());
|
||||
}
|
||||
|
||||
blitCmd.setDestinationMOCS(mocs);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -130,8 +130,8 @@ void BlitCommandsHelper<Family>::appendBlitCommandsBlockCopy(const BlitPropertie
|
|||
|
||||
auto mocs = rootDeviceEnvironment.getGmmHelper()->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED);
|
||||
|
||||
if (debugManager.flags.OverrideBlitterMocs.get() == 1) {
|
||||
mocs = rootDeviceEnvironment.getGmmHelper()->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER);
|
||||
if (debugManager.flags.OverrideBlitterMocs.get() != -1) {
|
||||
mocs = static_cast<uint32_t>(debugManager.flags.OverrideBlitterMocs.get());
|
||||
}
|
||||
|
||||
blitCmd.setDestinationMOCS(mocs);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -113,8 +113,8 @@ HWTEST2_F(BlitTests, givenGmmWithEnabledCompresionWhenAppendBlitCommandsForVillB
|
|||
HWTEST2_F(BlitTests, givenOverridedMocksValueWhenAppendBlitCommandsForVillBufferThenDebugMocksValueIsSet, IsPVC) {
|
||||
using MEM_SET = typename FamilyType::MEM_SET;
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
uint32_t mockValue = pDevice->getGmmHelper()->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER);
|
||||
debugManager.flags.OverrideBlitterMocs.set(1);
|
||||
uint32_t mockValue = pDevice->getGmmHelper()->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER) + 1;
|
||||
debugManager.flags.OverrideBlitterMocs.set(mockValue);
|
||||
|
||||
uint32_t pattern = 1;
|
||||
uint32_t streamBuffer[100] = {};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -121,9 +121,9 @@ HWTEST2_F(BlitTests, givenGmmWithEnabledCompresionAndDebugFlagSetWhenAppendBlitC
|
|||
HWTEST2_F(BlitTests, givenOverridedMocksValueWhenAppendBlitCommandsForFillBufferThenDebugMocksValueIsSet, BlitPlatforms) {
|
||||
using XY_COLOR_BLT = typename FamilyType::XY_COLOR_BLT;
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
uint32_t mockValue = pDevice->getGmmHelper()->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER);
|
||||
;
|
||||
debugManager.flags.OverrideBlitterMocs.set(1);
|
||||
uint32_t mockValue = pDevice->getGmmHelper()->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER) + 1;
|
||||
|
||||
debugManager.flags.OverrideBlitterMocs.set(mockValue);
|
||||
|
||||
auto blitCmd = FamilyType::cmdInitXyColorBlt;
|
||||
MockGraphicsAllocation mockAllocation(0, AllocationType::internalHostMemory,
|
||||
|
|
Loading…
Reference in New Issue