mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
fix: correct thread/eu ratio for scratch to Xe2
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ae6c6a3625
commit
a3b6c1fa6d
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -4883,6 +4883,10 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandStreamReceiverHwTest, givenScratchSpaceSurfa
|
||||
|
||||
uint32_t perThreadScratchSize = 65;
|
||||
uint32_t expectedValue = Math::nextPowerOfTwo(perThreadScratchSize);
|
||||
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
productHelper.adjustPerThreadScratchSize(expectedValue);
|
||||
|
||||
bool stateBaseAddressDirty = false;
|
||||
bool cfeStateDirty = false;
|
||||
uint8_t surfaceHeap[1000];
|
||||
@@ -4905,6 +4909,11 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandStreamReceiverHwTest, givenScratchSpaceSurfa
|
||||
bool stateBaseAddressDirty = false;
|
||||
scratchController->setRequiredScratchSpace(surfaceState, 0u, 0u, misalignedSizeForPrivateScratch,
|
||||
*pDevice->getDefaultEngine().osContext, stateBaseAddressDirty, cfeStateDirty);
|
||||
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
productHelper.adjustPerThreadScratchSize(misalignedSizeForPrivateScratch);
|
||||
productHelper.adjustPerThreadScratchSize(alignedSizeForPrivateScratch);
|
||||
|
||||
EXPECT_NE(scratchController->scratchSlot1SizeInBytes, misalignedSizeForPrivateScratch * scratchController->computeUnitsUsedForScratch);
|
||||
EXPECT_EQ(scratchController->scratchSlot1SizeInBytes, alignedSizeForPrivateScratch * scratchController->computeUnitsUsedForScratch);
|
||||
EXPECT_EQ(scratchController->scratchSlot1SizeInBytes, scratchController->getScratchSpaceSlot1Allocation()->getUnderlyingBufferSize());
|
||||
|
||||
@@ -1098,3 +1098,10 @@ HWTEST2_F(ProductHelperTest, givenProductHelperWhenGetRequiredDetectIndirectVers
|
||||
EXPECT_EQ(9u, productHelper->getRequiredDetectIndirectVersion());
|
||||
EXPECT_EQ(6u, productHelper->getRequiredDetectIndirectVersionVC());
|
||||
}
|
||||
|
||||
HWTEST_F(ProductHelperTest, whenAdjustPerThreadScratchSizeThenSizeIsNotChanged) {
|
||||
constexpr uint32_t initialPerThreadScratchSize = 0xDEADBEEF;
|
||||
uint32_t perThreadScratchSize = initialPerThreadScratchSize;
|
||||
productHelper->adjustPerThreadScratchSize(perThreadScratchSize);
|
||||
EXPECT_EQ(initialPerThreadScratchSize, perThreadScratchSize);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
* Copyright (C) 2024-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,4 +7,5 @@
|
||||
|
||||
#include "shared/test/common/test_macros/hw_test_base.h"
|
||||
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, whenGettingPreferredAllocationMethodThenNoPreferenceIsReturned, IGFX_BMG);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, whenGettingPreferredAllocationMethodThenNoPreferenceIsReturned, IGFX_BMG);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, whenAdjustPerThreadScratchSizeThenSizeIsNotChanged, IGFX_BMG);
|
||||
|
||||
@@ -119,11 +119,13 @@ BMGTEST_F(BmgProductHelper, givenProductHelperWhenAdjustNumberOfCcsThenOverrideT
|
||||
EXPECT_EQ(hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled, 1u);
|
||||
}
|
||||
|
||||
BMGTEST_F(BmgProductHelper, givenProductHelperWhenGettingThreadEuRatioForScratchThen16IsReturned) {
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
EXPECT_EQ(16u, productHelper->getThreadEuRatioForScratch(hwInfo));
|
||||
}
|
||||
|
||||
BMGTEST_F(BmgProductHelper, givenProductHelperWhenCheckDirectSubmissionSupportedThenTrueIsReturned) {
|
||||
EXPECT_TRUE(productHelper->isDirectSubmissionSupported(releaseHelper));
|
||||
}
|
||||
|
||||
BMGTEST_F(BmgProductHelper, whenAdjustPerThreadScratchSizeThenSizeIsDoubled) {
|
||||
constexpr uint32_t initialPerThreadScratchSize = 0x1234u;
|
||||
uint32_t perThreadScratchSize = initialPerThreadScratchSize;
|
||||
productHelper->adjustPerThreadScratchSize(perThreadScratchSize);
|
||||
EXPECT_EQ(initialPerThreadScratchSize * 2, perThreadScratchSize);
|
||||
}
|
||||
|
||||
@@ -35,5 +35,4 @@ HWTEST_EXCLUDE_PRODUCT(GmmCompressionTests, givenEnabledAndPreferredE2ECWhenAppl
|
||||
HWTEST_EXCLUDE_PRODUCT(CommandEncodeSemaphore, givenIndirectModeSetWhenProgrammingSemaphoreThenSetIndirectBit_IsAtLeastXeHpCore, IGFX_XE2_HPG_CORE);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenBooleanUncachedWhenCallOverridePatIndexThenProperPatIndexIsReturned, IGFX_XE2_HPG_CORE);
|
||||
HWTEST_EXCLUDE_PRODUCT(GfxCoreHelperTest, whenEncodeAdditionalTimestampOffsetsThenNothingEncoded, IGFX_XE2_HPG_CORE);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenGetThreadEuRatioForScratchThen8IsReturned, IGFX_XE2_HPG_CORE);
|
||||
HWTEST_EXCLUDE_PRODUCT(GfxCoreHelperTest, givenGetDeviceTimestampWidthCalledThenReturnCorrectValue, IGFX_XE2_HPG_CORE);
|
||||
|
||||
@@ -157,8 +157,3 @@ LNLTEST_F(LnlProductHelper, givenProductHelperWhenCheckingIsDeviceUsmAllocationR
|
||||
LNLTEST_F(LnlProductHelper, givenProductHelperWhenCheckingIsBufferPoolAllocatorSupportedThenCorrectValueIsReturned) {
|
||||
EXPECT_TRUE(productHelper->isBufferPoolAllocatorSupported());
|
||||
}
|
||||
|
||||
LNLTEST_F(LnlProductHelper, givenProductHelperWhenGettingThreadEuRatioForScratchThen16IsReturned) {
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
EXPECT_EQ(16u, productHelper->getThreadEuRatioForScratch(hwInfo));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user