Revert "Disable EUFusion for odd work groups with DPAS on DG2"

This reverts commit 017d66a469.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2023-02-03 02:11:42 +01:00
committed by Compute-Runtime-Automation
parent 47486ca55a
commit 606a900080
28 changed files with 45 additions and 548 deletions

View File

@@ -723,4 +723,5 @@ template <typename gfxProduct>
bool GfxCoreHelperHw<gfxProduct>::isRelaxedOrderingSupported() const {
return false;
}
} // namespace NEO

View File

@@ -195,7 +195,6 @@ class ProductHelper {
virtual uint32_t getDefaultRevisionId() const = 0;
virtual bool isMultiContextResourceDeferDeletionSupported() const = 0;
virtual bool isFusedEuDisabledForDpas(bool kernelHasDpasInstructions, const uint32_t *lws, const uint32_t *groupCount) const = 0;
virtual ~ProductHelper() = default;
@@ -352,7 +351,6 @@ class ProductHelperHw : public ProductHelper {
uint32_t getDefaultRevisionId() const override;
bool isMultiContextResourceDeferDeletionSupported() const override;
bool isFusedEuDisabledForDpas(bool kernelHasDpasInstructions, const uint32_t *lws, const uint32_t *groupCount) const override;
~ProductHelperHw() override = default;

View File

@@ -727,8 +727,4 @@ bool ProductHelperHw<gfxProduct>::isMultiContextResourceDeferDeletionSupported()
return false;
}
template <PRODUCT_FAMILY gfxProduct>
bool ProductHelperHw<gfxProduct>::isFusedEuDisabledForDpas(bool kernelHasDpasInstructions, const uint32_t *lws, const uint32_t *groupCount) const {
return false;
}
} // namespace NEO

View File

@@ -235,21 +235,5 @@ template <>
std::optional<aub_stream::ProductFamily> ProductHelperHw<gfxProduct>::getAubStreamProductFamily() const {
return aub_stream::ProductFamily::Dg2;
};
template <>
bool ProductHelperHw<gfxProduct>::isFusedEuDisabledForDpas(bool kernelHasDpasInstructions, const uint32_t *lws, const uint32_t *groupCount) const {
if (!kernelHasDpasInstructions) {
return false;
} else if (lws == nullptr || groupCount == nullptr) {
return true;
} else if (size_t lwsCount = lws[0] * lws[1] * lws[2]; lwsCount > 1 && (lwsCount & 1) != 0) {
return true;
} else if (lwsCount > 1) {
return false;
} else if ((groupCount[0] & 1) != 0) {
return true;
} else {
return false;
}
}
} // namespace NEO

View File

@@ -43,5 +43,6 @@ template <>
bool ProductHelperHw<gfxProduct>::isMultiContextResourceDeferDeletionSupported() const {
return true;
}
template class ProductHelperHw<gfxProduct>;
} // namespace NEO

View File

@@ -1459,7 +1459,3 @@ HWTEST_F(ProductHelperCommonTest, givenPatIndexAndAllocationTypeWhenCallOverride
patIndex = 3u;
EXPECT_EQ(patIndex, gfxCoreHelper.overridePatIndex(allocationType, patIndex));
}
HWTEST_F(ProductHelperCommonTest, givenHwHelperWhenIsFusedEuDisabledForDpasCalledThenFalseReturned) {
auto &gfxCoreHelper = getHelper<ProductHelper>();
EXPECT_FALSE(gfxCoreHelper.isFusedEuDisabledForDpas(true, nullptr, nullptr));
}

View File

@@ -33,4 +33,3 @@ HWTEST_EXCLUDE_PRODUCT(XeHpgSbaTest, givenSpecificProductFamilyWhenAppendingSbaT
HWTEST_EXCLUDE_PRODUCT(GfxCoreHelperTest, GivenZeroSlmSizeWhenComputeSlmSizeIsCalledThenCorrectValueIsReturned, IGFX_DG2);
HWTEST_EXCLUDE_PRODUCT(ProductHelperTestXeHpgCore, givenProductHelperWhenCheckTimestampWaitSupportForEventsThenReturnFalse, IGFX_DG2);
HWTEST_EXCLUDE_PRODUCT(CommandEncodeStatesTestDg2AndLater, GivenVariousSlmTotalSizesAndSettingRevIDToDifferentValuesWhenSetAdditionalInfoIsCalledThenCorrectValuesAreSet_IsXeHpgCore, IGFX_DG2);
HWTEST_EXCLUDE_PRODUCT(ProductHelperCommonTest, givenHwHelperWhenIsFusedEuDisabledForDpasCalledThenFalseReturned, IGFX_DG2);

View File

@@ -6,9 +6,7 @@
*/
#include "shared/source/helpers/product_config_helper.h"
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/source/xe_hpg_core/hw_cmds_dg2.h"
#include "shared/test/common/fixtures/device_fixture.h"
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
#include "shared/test/common/test_macros/test.h"
@@ -16,7 +14,6 @@
using namespace NEO;
using ProductConfigHelperDg2Tests = ::testing::Test;
using ProductHelperTests = Test<DeviceFixture>;
DG2TEST_F(ProductConfigHelperDg2Tests, givenVariousVariantsOfXeHpgAcronymsWhenGetReleaseThenCorrectValueIsReturned) {
std::vector<std::string> acronymsVariants = {"xe_hpg_core", "xe_hpg", "xehpg", "XeHpg"};
@@ -32,55 +29,3 @@ DG2TEST_F(ProductConfigHelperDg2Tests, givenXeHpgReleaseWhenSearchForDeviceAcron
auto aotInfos = productConfigHelper->getDeviceAotInfo();
EXPECT_TRUE(std::any_of(aotInfos.begin(), aotInfos.end(), ProductConfigHelper::findDeviceAcronymForRelease(AOT::XE_HPG_RELEASE)));
}
DG2TEST_F(ProductHelperTests, givenNoDpasInstructionInKernelHelperWhenCheckingIfEuFusionShouldBeDisabledThenFalseReturned) {
auto &gfxCoreHelper = getHelper<ProductHelper>();
const uint32_t lws[3] = {1, 1, 1};
const uint32_t groupCount[3] = {5, 3, 1};
bool dpasInstruction = false;
EXPECT_FALSE(gfxCoreHelper.isFusedEuDisabledForDpas(dpasInstruction, lws, groupCount));
}
DG2TEST_F(ProductHelperTests, givenDpasInstructionLwsAndGroupCountIsNullPtrInKernelHelperWhenCheckingIfEuFusionShouldBeDisabledThenTrueReturned) {
auto &gfxCoreHelper = getHelper<ProductHelper>();
bool dpasInstruction = true;
EXPECT_TRUE(gfxCoreHelper.isFusedEuDisabledForDpas(dpasInstruction, nullptr, nullptr));
}
DG2TEST_F(ProductHelperTests, givenDpasInstructionLwsIsNullPtrInKernelHelperWhenCheckingIfEuFusionShouldBeDisabledThenTrueReturned) {
auto &gfxCoreHelper = getHelper<ProductHelper>();
bool dpasInstruction = true;
const uint32_t groupCount[3] = {5, 3, 1};
EXPECT_TRUE(gfxCoreHelper.isFusedEuDisabledForDpas(dpasInstruction, nullptr, groupCount));
}
DG2TEST_F(ProductHelperTests, givenDpasInstructionGroupCountIsNullPtrInKernelHelperWhenCheckingIfEuFusionShouldBeDisabledThenTrueReturned) {
auto &gfxCoreHelper = getHelper<ProductHelper>();
bool dpasInstruction = true;
const uint32_t lws[3] = {1, 1, 1};
EXPECT_TRUE(gfxCoreHelper.isFusedEuDisabledForDpas(dpasInstruction, lws, nullptr));
}
DG2TEST_F(ProductHelperTests, givenDpasInstructionLwsAndLwsIsOddWhenCheckingIfEuFusionShouldBeDisabledThenTrueReturned) {
auto &gfxCoreHelper = getHelper<ProductHelper>();
const uint32_t lws[3] = {7, 3, 1};
const uint32_t groupCount[3] = {2, 1, 1};
bool dpasInstruction = true;
EXPECT_TRUE(gfxCoreHelper.isFusedEuDisabledForDpas(dpasInstruction, lws, groupCount));
}
DG2TEST_F(ProductHelperTests, givenDpasInstructionLwsAndLwsIsNoOddWhenCheckingIfEuFusionShouldBeDisabledThenFalseReturned) {
auto &gfxCoreHelper = getHelper<ProductHelper>();
const uint32_t lws[3] = {8, 3, 1};
const uint32_t groupCount[3] = {2, 1, 1};
bool dpasInstruction = true;
EXPECT_FALSE(gfxCoreHelper.isFusedEuDisabledForDpas(dpasInstruction, lws, groupCount));
}
DG2TEST_F(ProductHelperTests, givenDpasInstructionLwsAndLwsIsOneAndXGroupCountIsOddWhenCheckingIfEuFusionShouldBeDisabledThenFalseReturned) {
auto &gfxCoreHelper = getHelper<ProductHelper>();
const uint32_t lws[3] = {1, 1, 1};
const uint32_t groupCount[3] = {5, 1, 1};
bool dpasInstruction = true;
EXPECT_TRUE(gfxCoreHelper.isFusedEuDisabledForDpas(dpasInstruction, lws, groupCount));
}
DG2TEST_F(ProductHelperTests, givenDpasInstructionLwsAndLwsIsOneAndXGroupCountIsNoOddWhenCheckingIfEuFusionShouldBeDisabledThenFalseReturned) {
auto &gfxCoreHelper = getHelper<ProductHelper>();
const uint32_t lws[3] = {1, 1, 1};
const uint32_t groupCount[3] = {4, 1, 1};
bool dpasInstruction = true;
EXPECT_FALSE(gfxCoreHelper.isFusedEuDisabledForDpas(dpasInstruction, lws, groupCount));
}