mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +08:00
feature: add debug key for WMTP size
Related-To: HSD-16028003349 Signed-off-by: Brandon Yates <brandon.yates@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
5714c3858f
commit
cd862022a8
@@ -47,6 +47,7 @@ enum class AILEnumeration : uint32_t {
|
||||
disableBindlessAddressing,
|
||||
disableZeroContract,
|
||||
forceLocalOnlyForDeviceUSM,
|
||||
customWmtpDataSize,
|
||||
};
|
||||
|
||||
class AILConfiguration;
|
||||
|
||||
@@ -100,7 +100,11 @@ size_t SipKernel::getStateSaveAreaSize(Device *device) const {
|
||||
auto numSlices = std::max(hwInfo.gtSystemInfo.MaxSlicesSupported, NEO::GfxCoreHelper::getHighestEnabledSlice(hwInfo));
|
||||
size_t stateSaveAreaSize = 0;
|
||||
if (hdr->versionHeader.version.major == 4) {
|
||||
stateSaveAreaSize = static_cast<size_t>(hdr->totalWmtpDataSize);
|
||||
if (debugManager.flags.ForceTotalWMTPDataSize.get() > -1) {
|
||||
stateSaveAreaSize = static_cast<size_t>(debugManager.flags.ForceTotalWMTPDataSize.get());
|
||||
} else {
|
||||
stateSaveAreaSize = static_cast<size_t>(hdr->totalWmtpDataSize);
|
||||
}
|
||||
} else if (hdr->versionHeader.version.major == 3) {
|
||||
stateSaveAreaSize = numSlices *
|
||||
hdr->regHeaderV3.num_subslices_per_slice *
|
||||
|
||||
@@ -688,6 +688,7 @@ DECLARE_DEBUG_VARIABLE(bool, BinaryCacheTrace, false, "enable cl_cache to produc
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ForceDummyBlitWa, -1, "-1: default, 0: disabled, 1: enabled, Forces a workaround with dummy blits, driver adds an extra blit before command MI_ARB_CHECK on bcs")
|
||||
DECLARE_DEBUG_VARIABLE(bool, VfBarResourceAllocationWa, true, "Enables/disables WA for resizing VF BAR to 2GB on Warm Reset.")
|
||||
DECLARE_DEBUG_VARIABLE(bool, DoNotUseProductConfigForValidationWa, false, "Forces a workaround with legacy device binary validation usage (skip checking PRODUCT_CONFIG even if passed");
|
||||
DECLARE_DEBUG_VARIABLE(int64_t, ForceTotalWMTPDataSize, -1, "<=0: disabled, >0: size in bytes of total WMTP Data Size")
|
||||
|
||||
/* SPD LOGGING RELATED FLAGS */
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, EnableLogLevel, 6, "0: trace, 1: debug 2: info, 3: warning 4: error, 5: critical 6: off");
|
||||
|
||||
@@ -670,4 +670,5 @@ InOrderCopyMiFlushSync = -1
|
||||
SplitBcsForCopyOffload = -1
|
||||
LimitIsaPrefetchSize = -1
|
||||
EnableSysmanLegacyModeUsingZesInit = 1
|
||||
ForceTotalWMTPDataSize = -1
|
||||
# Please don't edit below this line
|
||||
|
||||
@@ -470,6 +470,18 @@ TEST_F(StateSaveAreaSipTest, givenStateSaveAreaHeaderVersion4WhenGetStateSaveAre
|
||||
EXPECT_EQ(MockSipData::totalWmtpDataSize, SipKernel::getSipKernel(*pDevice, nullptr).getStateSaveAreaSize(pDevice));
|
||||
}
|
||||
|
||||
TEST_F(StateSaveAreaSipTest, givenStateSaveAreaHeaderVersion4WhenGetStateSaveAreaSizeCalledAndForceWmtpDataSizeIsGreaterThanZeroThenForcedTotalWmtpDataSizeIsReturned) {
|
||||
DebugManagerStateRestore restorer;
|
||||
MockSipData::mockSipKernel->mockStateSaveAreaHeader = MockSipData::createStateSaveAreaHeader(4);
|
||||
auto header = reinterpret_cast<SIP::StateSaveAreaHeader *>(MockSipData::mockSipKernel->mockStateSaveAreaHeader.data());
|
||||
header->versionHeader.version.major = 4u;
|
||||
const size_t forcedWmtpDataSize = 98304294; // any arbitrary number
|
||||
debugManager.flags.ForceTotalWMTPDataSize.set(forcedWmtpDataSize);
|
||||
const size_t expected = alignUp(forcedWmtpDataSize, MemoryConstants::pageSize);
|
||||
const size_t actual = SipKernel::getSipKernel(*pDevice, nullptr).getStateSaveAreaSize(pDevice);
|
||||
EXPECT_EQ(expected, actual);
|
||||
}
|
||||
|
||||
TEST_F(StateSaveAreaSipTest, givenStateSaveAreaHeaderVersion4WhenGetSipKernelIsCalledForCsrSipThenPreemptionSurfaceSizeIsUpdated) {
|
||||
auto stateSaveAreaHeader = MockSipData::createStateSaveAreaHeader(4);
|
||||
MockCompilerDebugVars debugVars = {};
|
||||
|
||||
Reference in New Issue
Block a user