mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
Apply max threads w/a only for specyfic Arc devices
With this commit w/a for max thread value will be applied only for Native 512EU devices. Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
5ba56690f5
commit
27ca561482
@@ -26,7 +26,7 @@ DG2TEST_F(Dg2UsDeviceIdTest, givenDg2ProductWhenCheckFp64SupportThenReturnFalse)
|
|||||||
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsFP64);
|
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsFP64);
|
||||||
}
|
}
|
||||||
|
|
||||||
DG2TEST_F(Dg2UsDeviceIdTest, givenDeviceThatHasHighNumberOfExecutionUnitsAndA0SteppingWhenMaxWorkgroupSizeIsComputedThenItIsLimitedTo512) {
|
DG2TEST_F(Dg2UsDeviceIdTest, givenDeviceThatHasHighNumberOfExecutionUnitsA0SteppingAndG10DevIdWhenMaxWorkgroupSizeIsComputedThenItIsLimitedTo512) {
|
||||||
HardwareInfo myHwInfo = *defaultHwInfo;
|
HardwareInfo myHwInfo = *defaultHwInfo;
|
||||||
GT_SYSTEM_INFO &mySysInfo = myHwInfo.gtSystemInfo;
|
GT_SYSTEM_INFO &mySysInfo = myHwInfo.gtSystemInfo;
|
||||||
PLATFORM &myPlatform = myHwInfo.platform;
|
PLATFORM &myPlatform = myHwInfo.platform;
|
||||||
@@ -37,13 +37,14 @@ DG2TEST_F(Dg2UsDeviceIdTest, givenDeviceThatHasHighNumberOfExecutionUnitsAndA0St
|
|||||||
mySysInfo.DualSubSliceCount = 2;
|
mySysInfo.DualSubSliceCount = 2;
|
||||||
mySysInfo.ThreadCount = 32 * 8;
|
mySysInfo.ThreadCount = 32 * 8;
|
||||||
myPlatform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_A0, hardwareInfo);
|
myPlatform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_A0, hardwareInfo);
|
||||||
|
myPlatform.usDeviceID = DG2_G10_IDS[0];
|
||||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&myHwInfo));
|
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&myHwInfo));
|
||||||
|
|
||||||
EXPECT_EQ(512u, device->sharedDeviceInfo.maxWorkGroupSize);
|
EXPECT_EQ(512u, device->sharedDeviceInfo.maxWorkGroupSize);
|
||||||
EXPECT_EQ(device->sharedDeviceInfo.maxWorkGroupSize / 8, device->getDeviceInfo().maxNumOfSubGroups);
|
EXPECT_EQ(device->sharedDeviceInfo.maxWorkGroupSize / 8, device->getDeviceInfo().maxNumOfSubGroups);
|
||||||
}
|
}
|
||||||
|
|
||||||
DG2TEST_F(Dg2UsDeviceIdTest, givenEnabledFtrPooledEuAndA0SteppingWhenCalculatingMaxEuPerSSThenDontIgnoreEuCountPerPoolMin) {
|
DG2TEST_F(Dg2UsDeviceIdTest, givenEnabledFtrPooledEuA0SteppingAndG10DevIdWhenCalculatingMaxEuPerSSThenDontIgnoreEuCountPerPoolMin) {
|
||||||
HardwareInfo myHwInfo = *defaultHwInfo;
|
HardwareInfo myHwInfo = *defaultHwInfo;
|
||||||
GT_SYSTEM_INFO &mySysInfo = myHwInfo.gtSystemInfo;
|
GT_SYSTEM_INFO &mySysInfo = myHwInfo.gtSystemInfo;
|
||||||
FeatureTable &mySkuTable = myHwInfo.featureTable;
|
FeatureTable &mySkuTable = myHwInfo.featureTable;
|
||||||
@@ -54,6 +55,7 @@ DG2TEST_F(Dg2UsDeviceIdTest, givenEnabledFtrPooledEuAndA0SteppingWhenCalculating
|
|||||||
mySysInfo.EuCountPerPoolMin = 99999;
|
mySysInfo.EuCountPerPoolMin = 99999;
|
||||||
mySkuTable.flags.ftrPooledEuEnabled = 1;
|
mySkuTable.flags.ftrPooledEuEnabled = 1;
|
||||||
myPlatform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_A0, hardwareInfo);
|
myPlatform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_A0, hardwareInfo);
|
||||||
|
myPlatform.usDeviceID = DG2_G10_IDS[0];
|
||||||
|
|
||||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&myHwInfo));
|
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&myHwInfo));
|
||||||
|
|
||||||
@@ -65,6 +67,7 @@ DG2TEST_F(Dg2UsDeviceIdTest, givenEnabledFtrPooledEuAndA0SteppingWhenCalculating
|
|||||||
|
|
||||||
DG2TEST_F(Dg2UsDeviceIdTest, givenRevisionEnumThenProperMaxThreadsForWorkgroupIsReturned) {
|
DG2TEST_F(Dg2UsDeviceIdTest, givenRevisionEnumThenProperMaxThreadsForWorkgroupIsReturned) {
|
||||||
const auto &hwInfoConfig = *HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
|
const auto &hwInfoConfig = *HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
|
||||||
|
hardwareInfo.platform.usDeviceID = DG2_G10_IDS[0];
|
||||||
hardwareInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_A0, hardwareInfo);
|
hardwareInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_A0, hardwareInfo);
|
||||||
EXPECT_EQ(64u, hwInfoConfig.getMaxThreadsForWorkgroupInDSSOrSS(hardwareInfo, 64u, 64u));
|
EXPECT_EQ(64u, hwInfoConfig.getMaxThreadsForWorkgroupInDSSOrSS(hardwareInfo, 64u, 64u));
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ bool HwInfoConfigHw<gfxProduct>::isAdditionalStateBaseAddressWARequired(const Ha
|
|||||||
template <>
|
template <>
|
||||||
bool HwInfoConfigHw<gfxProduct>::isMaxThreadsForWorkgroupWARequired(const HardwareInfo &hwInfo) const {
|
bool HwInfoConfigHw<gfxProduct>::isMaxThreadsForWorkgroupWARequired(const HardwareInfo &hwInfo) const {
|
||||||
uint32_t stepping = getSteppingFromHwRevId(hwInfo);
|
uint32_t stepping = getSteppingFromHwRevId(hwInfo);
|
||||||
return REVISION_A0 == stepping;
|
return (REVISION_A0 == stepping && DG2::isG10(hwInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
|
|||||||
@@ -36,8 +36,11 @@ DG2TEST_F(TestDg2HwInfoConfig, givenDG2WithA0SteppingThenMaxThreadsForWorkgroupW
|
|||||||
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
|
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
|
||||||
auto hwInfo = pDevice->getRootDeviceEnvironment().getMutableHardwareInfo();
|
auto hwInfo = pDevice->getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||||
hwInfo->platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_A0, *hwInfo);
|
hwInfo->platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_A0, *hwInfo);
|
||||||
auto isWARequired = hwInfoConfig.isMaxThreadsForWorkgroupWARequired(pDevice->getHardwareInfo());
|
for (const auto &devId : DG2_G10_IDS) {
|
||||||
EXPECT_TRUE(isWARequired);
|
hwInfo->platform.usDeviceID = devId;
|
||||||
|
auto isWARequired = hwInfoConfig.isMaxThreadsForWorkgroupWARequired(pDevice->getHardwareInfo());
|
||||||
|
EXPECT_TRUE(isWARequired);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DG2TEST_F(TestDg2HwInfoConfig, givenDG2WithBSteppingThenMaxThreadsForWorkgroupWAIsNotRequired) {
|
DG2TEST_F(TestDg2HwInfoConfig, givenDG2WithBSteppingThenMaxThreadsForWorkgroupWAIsNotRequired) {
|
||||||
|
|||||||
Reference in New Issue
Block a user