fix: Use Rcs engine in blender on DG2

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2024-02-07 16:36:04 +00:00
committed by Compute-Runtime-Automation
parent 371788210d
commit ce17580b28
26 changed files with 102 additions and 45 deletions

View File

@@ -644,7 +644,7 @@ struct EngineInstancedDeviceExecuteTests : public ::testing::Test {
auto &gfxCoreHelper = rootDeviceEnvironment.getHelper<NEO::GfxCoreHelper>();
auto &productHelper = rootDeviceEnvironment.getHelper<NEO::ProductHelper>();
gfxCoreHelper.adjustDefaultEngineType(hwInfo, productHelper);
gfxCoreHelper.adjustDefaultEngineType(hwInfo, productHelper, rootDeviceEnvironment.ailConfiguration.get());
if (!multiCcsDevice(rootDeviceEnvironment, numCcs)) {
return false;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -392,7 +392,7 @@ HWTEST_F(DeviceTest, givenDeviceWhenAskingForDefaultEngineThenReturnValidValue)
executionEnvironment->prepareRootDeviceEnvironments(1u);
auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
auto &productHelper = getHelper<ProductHelper>();
gfxCoreHelper.adjustDefaultEngineType(executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo(), productHelper);
gfxCoreHelper.adjustDefaultEngineType(executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo(), productHelper, executionEnvironment->rootDeviceEnvironments[0]->ailConfiguration.get());
auto device = std::unique_ptr<MockDevice>(Device::create<MockDevice>(executionEnvironment, 0));
auto osContext = device->getDefaultEngine().osContext;

View File

@@ -377,7 +377,7 @@ struct EngineInstancedDeviceTests : public ::testing::Test {
hwInfo->capabilityTable.blitterOperationsSupported = true;
auto &gfxCoreHelper = rootDeviceEnvironment.getHelper<GfxCoreHelper>();
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
gfxCoreHelper.adjustDefaultEngineType(hwInfo, productHelper);
gfxCoreHelper.adjustDefaultEngineType(hwInfo, productHelper, rootDeviceEnvironment.ailConfiguration.get());
if (!multiCcsDevice(rootDeviceEnvironment, numCcs)) {
return false;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2023 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -135,7 +135,7 @@ GEN12LPTEST_F(GfxCoreHelperTestGen12Lp, WhenAdjustingDefaultEngineTypeThenRcsIsS
auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
auto &productHelper = getHelper<ProductHelper>();
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper);
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper, nullptr);
EXPECT_EQ(aub_stream::ENGINE_RCS, hardwareInfo.capabilityTable.defaultEngineType);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -72,6 +72,8 @@ class AILConfiguration {
virtual bool useLegacyValidationLogic() = 0;
virtual bool forceRcs() = 0;
protected:
virtual void applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) = 0;
std::string processName;
@@ -81,6 +83,7 @@ class AILConfiguration {
};
extern const std::set<std::string_view> applicationsContextSyncFlag;
extern const std::set<std::string_view> applicationsForceRcsDg2;
template <PRODUCT_FAMILY product>
class AILConfigurationHw : public AILConfiguration {
@@ -96,6 +99,9 @@ class AILConfigurationHw : public AILConfiguration {
bool isFallbackToPatchtokensRequired(const std::string &kernelSources) override;
bool isContextSyncFlagRequired() override;
bool useLegacyValidationLogic() override;
bool forceRcs() override;
bool shouldForceRcs = false;
};
template <PRODUCT_FAMILY product>

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -50,4 +50,9 @@ inline bool AILConfigurationHw<product>::useLegacyValidationLogic() {
return false;
}
template <PRODUCT_FAMILY product>
inline bool AILConfigurationHw<product>::forceRcs() {
return shouldForceRcs;
}
} // namespace NEO

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -26,6 +26,8 @@ std::map<std::string_view, std::vector<AILEnumeration>> applicationMap = {{"blen
std::map<std::string_view, std::vector<AILEnumeration>> applicationMapMTL = {{"svchost", {AILEnumeration::disableDirectSubmission}}};
const std::set<std::string_view> applicationsForceRcsDg2 = {};
const std::set<std::string_view> applicationsContextSyncFlag = {};
AILConfigurationCreateFunctionType ailConfigurationFactory[IGFX_MAX_PRODUCT];

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -56,6 +56,14 @@ bool AILConfigurationHw<IGFX_DG2>::useLegacyValidationLogic() {
return it != applicationsLegacyValidationPathDg2.end() ? true : false;
}
template <>
inline void AILConfigurationHw<IGFX_DG2>::applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) {
auto search = applicationsForceRcsDg2.find(processName);
if (search != applicationsForceRcsDg2.end()) {
shouldForceRcs = true;
}
}
template class AILConfigurationHw<IGFX_DG2>;
} // namespace NEO

View File

@@ -44,6 +44,7 @@ struct PipeControlArgs;
struct KernelDescriptor;
class ProductHelper;
class GfxCoreHelper;
class AILConfiguration;
using EngineInstancesContainer = StackVec<EngineTypeUsage, 32>;
using GfxCoreHelperCreateFunctionType = std::unique_ptr<GfxCoreHelper> (*)();
@@ -61,7 +62,7 @@ class GfxCoreHelper {
virtual size_t getKernelIsaPointerAlignment() const = 0;
virtual uint32_t getComputeUnitsUsedForScratch(const RootDeviceEnvironment &rootDeviceEnvironment) const = 0;
virtual uint32_t getPitchAlignmentForImage(const RootDeviceEnvironment &rootDeviceEnvironment) const = 0;
virtual void adjustDefaultEngineType(HardwareInfo *pHwInfo, const ProductHelper &productHelper) = 0;
virtual void adjustDefaultEngineType(HardwareInfo *pHwInfo, const ProductHelper &productHelper, AILConfiguration *ailConfiguration) = 0;
virtual SipKernelType getSipKernelType(bool debuggingActive) const = 0;
virtual bool isLocalMemoryEnabled(const HardwareInfo &hwInfo) const = 0;
virtual bool is1MbAlignmentSupported(const HardwareInfo &hwInfo, bool isCompressionEnabled) const = 0;
@@ -237,7 +238,7 @@ class GfxCoreHelperHw : public GfxCoreHelper {
uint32_t getPitchAlignmentForImage(const RootDeviceEnvironment &rootDeviceEnvironment) const override;
void adjustDefaultEngineType(HardwareInfo *pHwInfo, const ProductHelper &productHelper) override;
void adjustDefaultEngineType(HardwareInfo *pHwInfo, const ProductHelper &productHelper, AILConfiguration *ailConfiguration) override;
SipKernelType getSipKernelType(bool debuggingActive) const override;

View File

@@ -13,7 +13,7 @@
namespace NEO {
template <typename GfxFamily>
void GfxCoreHelperHw<GfxFamily>::adjustDefaultEngineType(HardwareInfo *pHwInfo, const ProductHelper &productHelper) {
void GfxCoreHelperHw<GfxFamily>::adjustDefaultEngineType(HardwareInfo *pHwInfo, const ProductHelper &productHelper, AILConfiguration *ailConfiguration) {
}
template <typename GfxFamily>

View File

@@ -5,6 +5,7 @@
*
*/
#include "shared/source/ail/ail_configuration.h"
#include "shared/source/aub/aub_helper.h"
#include "shared/source/command_container/command_encoder.h"
#include "shared/source/command_container/implicit_scaling.h"
@@ -64,14 +65,15 @@ const EngineInstancesContainer GfxCoreHelperHw<GfxFamily>::getGpgpuEngineInstanc
EngineInstancesContainer engines;
if (hwInfo.featureTable.flags.ftrCCSNode) {
if (hwInfo.featureTable.flags.ftrCCSNode && !rootDeviceEnvironment.getAILConfigurationHelper()->forceRcs()) {
for (uint32_t i = 0; i < hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled; i++) {
engines.push_back({static_cast<aub_stream::EngineType>(i + aub_stream::ENGINE_CCS), EngineUsage::regular});
}
}
if ((debugManager.flags.NodeOrdinal.get() == static_cast<int32_t>(aub_stream::EngineType::ENGINE_RCS)) ||
hwInfo.featureTable.flags.ftrRcsNode) {
hwInfo.featureTable.flags.ftrRcsNode ||
rootDeviceEnvironment.getAILConfigurationHelper()->forceRcs()) {
engines.push_back({aub_stream::ENGINE_RCS, EngineUsage::regular});
}

View File

@@ -149,7 +149,7 @@ int ProductHelper::configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo
auto &gfxCoreHelper = rootDeviceEnvironment.getHelper<GfxCoreHelper>();
outHwInfo->capabilityTable.ftrSupportsCoherency = false;
gfxCoreHelper.adjustDefaultEngineType(outHwInfo, *this);
gfxCoreHelper.adjustDefaultEngineType(outHwInfo, *this, rootDeviceEnvironment.ailConfiguration.get());
outHwInfo->capabilityTable.defaultEngineType = getChosenEngineType(*outHwInfo);
drm->checkQueueSliceSupport();

View File

@@ -23,7 +23,7 @@ int ProductHelper::configureHwInfoWddm(const HardwareInfo *inHwInfo, HardwareInf
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
outHwInfo->capabilityTable.ftrSvm = outHwInfo->featureTable.flags.ftrSVM;
gfxCoreHelper.adjustDefaultEngineType(outHwInfo, *this);
gfxCoreHelper.adjustDefaultEngineType(outHwInfo, *this, rootDeviceEnvironment.ailConfiguration.get());
outHwInfo->capabilityTable.defaultEngineType = getChosenEngineType(*outHwInfo);
this->setCapabilityCoherencyFlag(*outHwInfo, outHwInfo->capabilityTable.ftrSupportsCoherency);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -111,7 +111,7 @@ EngineGroupType GfxCoreHelperHw<Family>::getEngineGroupType(aub_stream::EngineTy
}
template <>
void GfxCoreHelperHw<Family>::adjustDefaultEngineType(HardwareInfo *pHwInfo, const ProductHelper &productHelper) {
void GfxCoreHelperHw<Family>::adjustDefaultEngineType(HardwareInfo *pHwInfo, const ProductHelper &productHelper, AILConfiguration *ailConfiguration) {
if (!pHwInfo->featureTable.flags.ftrCCSNode) {
pHwInfo->capabilityTable.defaultEngineType = aub_stream::EngineType::ENGINE_CCCS;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -47,11 +47,11 @@ uint32_t GfxCoreHelperHw<Family>::getMetricsLibraryGenId() const {
}
template <>
void GfxCoreHelperHw<Family>::adjustDefaultEngineType(HardwareInfo *pHwInfo, const ProductHelper &productHelper) {
void GfxCoreHelperHw<Family>::adjustDefaultEngineType(HardwareInfo *pHwInfo, const ProductHelper &productHelper, AILConfiguration *ailConfiguration) {
if (!pHwInfo->featureTable.flags.ftrCCSNode) {
pHwInfo->capabilityTable.defaultEngineType = aub_stream::ENGINE_RCS;
}
if (productHelper.isDefaultEngineTypeAdjustmentRequired(*pHwInfo)) {
if (productHelper.isDefaultEngineTypeAdjustmentRequired(*pHwInfo) || (ailConfiguration && ailConfiguration->forceRcs())) {
pHwInfo->capabilityTable.defaultEngineType = aub_stream::ENGINE_RCS;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023 Intel Corporation
* Copyright (C) 2023-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -31,6 +31,10 @@ class MockAILConfiguration : public AILConfiguration {
bool useLegacyValidationLogic() override {
return fallbackToLegacyValidationLogic;
}
bool forceRcsValue = false;
bool forceRcs() override {
return forceRcsValue;
}
protected:
void applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) override {}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2023 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -30,7 +30,7 @@ GEN11TEST_F(GfxCoreHelperTestGen11, WhenAdjustingDefaultEngineTypeThenEngineType
auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
auto &productHelper = getHelper<ProductHelper>();
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper);
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper, nullptr);
EXPECT_EQ(engineType, hardwareInfo.capabilityTable.defaultEngineType);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -30,7 +30,7 @@ DG1TEST_F(GfxCoreHelperTestDg1, givenDg1SteppingA0WhenAdjustDefaultEngineTypeCal
hardwareInfo.featureTable.flags.ftrCCSNode = true;
hardwareInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_A0, hardwareInfo);
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper);
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper, nullptr);
EXPECT_EQ(aub_stream::ENGINE_RCS, hardwareInfo.capabilityTable.defaultEngineType);
}
@@ -40,7 +40,7 @@ DG1TEST_F(GfxCoreHelperTestDg1, givenDg1SteppingBWhenAdjustDefaultEngineTypeCall
hardwareInfo.featureTable.flags.ftrCCSNode = true;
hardwareInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_B, hardwareInfo);
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper);
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper, nullptr);
EXPECT_EQ(aub_stream::ENGINE_RCS, hardwareInfo.capabilityTable.defaultEngineType);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -22,7 +22,7 @@ RKLTEST_F(GfxCoreHelperTestRkl, givenRklSteppingA0WhenAdjustDefaultEngineTypeCal
hardwareInfo.featureTable.flags.ftrCCSNode = true;
hardwareInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_A0, hardwareInfo);
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper);
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper, nullptr);
EXPECT_EQ(aub_stream::ENGINE_RCS, hardwareInfo.capabilityTable.defaultEngineType);
}
@@ -33,7 +33,7 @@ RKLTEST_F(GfxCoreHelperTestRkl, givenRklSteppingBWhenAdjustDefaultEngineTypeCall
hardwareInfo.featureTable.flags.ftrCCSNode = true;
hardwareInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_B, hardwareInfo);
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper);
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper, nullptr);
EXPECT_EQ(aub_stream::ENGINE_RCS, hardwareInfo.capabilityTable.defaultEngineType);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2023 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -21,7 +21,7 @@ TGLLPTEST_F(GfxCoreHelperTestGen12Lp, givenTgllpSteppingA0WhenAdjustDefaultEngin
hardwareInfo.featureTable.flags.ftrCCSNode = true;
hardwareInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_A0, hardwareInfo);
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper);
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper, nullptr);
EXPECT_EQ(aub_stream::ENGINE_RCS, hardwareInfo.capabilityTable.defaultEngineType);
}
@@ -32,7 +32,7 @@ TGLLPTEST_F(GfxCoreHelperTestGen12Lp, givenTgllpSteppingBWhenAdjustDefaultEngine
hardwareInfo.featureTable.flags.ftrCCSNode = true;
hardwareInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_A1, hardwareInfo);
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper);
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper, nullptr);
EXPECT_EQ(aub_stream::ENGINE_RCS, hardwareInfo.capabilityTable.defaultEngineType);
}
@@ -44,7 +44,7 @@ TGLLPTEST_F(GfxCoreHelperTestGen12Lp, givenTgllWhenWaForDefaultEngineIsNotApplie
hardwareInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_A0, hardwareInfo);
hardwareInfo.platform.eProductFamily = IGFX_UNKNOWN;
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper);
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper, nullptr);
EXPECT_EQ(aub_stream::ENGINE_RCS, hardwareInfo.capabilityTable.defaultEngineType);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -33,7 +33,7 @@ GEN8TEST_F(GfxCoreHelperTestGen8, WhenAdjustingDefaultEngineTypeThenEngineTypeIs
auto engineType = hardwareInfo.capabilityTable.defaultEngineType;
auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
auto &productHelper = getHelper<ProductHelper>();
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper);
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper, nullptr);
EXPECT_EQ(engineType, hardwareInfo.capabilityTable.defaultEngineType);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -34,7 +34,7 @@ GEN9TEST_F(GfxCoreHelperTestGen9, WhenAdjustingDefaultEngineTypeThenEngineTypeIs
auto engineType = hardwareInfo.capabilityTable.defaultEngineType;
auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
auto &productHelper = getHelper<ProductHelper>();
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper);
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper, nullptr);
EXPECT_EQ(engineType, hardwareInfo.capabilityTable.defaultEngineType);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -44,7 +44,7 @@ HWTEST2_F(GfxCoreHelperTestPvcAndLater, givenRenderEngineWhenRemapCalledThenUseC
auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
auto &productHelper = getHelper<ProductHelper>();
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper);
gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper, nullptr);
auto &rootDeviceEnvironment = pDevice->getRootDeviceEnvironment();
EXPECT_EQ(aub_stream::EngineType::ENGINE_CCCS, EngineHelpers::remapEngineTypeToHwSpecific(aub_stream::EngineType::ENGINE_RCS, rootDeviceEnvironment));

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -117,4 +117,5 @@ HWTEST2_F(AILTestsDg2, givenApplicationNameRequiringCrossTargetCompabilityWhenCa
EXPECT_TRUE(ail.useLegacyValidationLogic());
}
}
} // namespace NEO

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -14,6 +14,7 @@
#include "shared/test/common/helpers/default_hw_info.h"
#include "shared/test/common/helpers/gfx_core_helper_tests.h"
#include "shared/test/common/helpers/gtest_helpers.h"
#include "shared/test/common/mocks/mock_ail_configuration.h"
#include "shared/test/common/mocks/mock_device.h"
#include "shared/test/common/mocks/mock_execution_environment.h"
#include "shared/test/common/mocks/ult_device_factory.h"
@@ -63,6 +64,33 @@ DG2TEST_F(GfxCoreHelperTestDg2, givenRcsDisabledWhenGetGpgpuEnginesCalledThenDon
EXPECT_EQ(aub_stream::ENGINE_BCS, engines[7].first);
}
DG2TEST_F(GfxCoreHelperTestDg2, givenRcsDisabledWhenAilForceToUseRcsThenRcsIsSetAndCssIsNot) {
HardwareInfo hwInfo = *defaultHwInfo;
MockExecutionEnvironment mockExecutionEnvironment{};
hwInfo.featureTable.flags.ftrCCSNode = true;
hwInfo.featureTable.ftrBcsInfo = 1;
hwInfo.featureTable.flags.ftrRcsNode = false;
hwInfo.capabilityTable.blitterOperationsSupported = true;
hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_CCS;
hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = 4;
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo, 0));
auto ailConfiguration = std::make_unique<MockAILConfiguration>();
ailConfiguration->forceRcsValue = true;
auto &rootDeviceEnvironment = *device->getExecutionEnvironment()->rootDeviceEnvironments[0];
rootDeviceEnvironment.ailConfiguration.reset(ailConfiguration.release());
auto &gfxCoreHelper = device->getGfxCoreHelper();
auto &engines = gfxCoreHelper.getGpgpuEngineInstances(device->getRootDeviceEnvironment());
EXPECT_EQ(5u, engines.size());
EXPECT_EQ(aub_stream::ENGINE_RCS, engines[0].first);
EXPECT_EQ(getChosenEngineType(hwInfo), engines[1].first);
EXPECT_EQ(getChosenEngineType(hwInfo), engines[2].first);
EXPECT_EQ(aub_stream::ENGINE_BCS, engines[3].first);
EXPECT_EQ(aub_stream::ENGINE_BCS, engines[4].first);
}
DG2TEST_F(GfxCoreHelperTestDg2, givenRcsDisabledButDebugVariableSetWhenGetGpgpuEnginesCalledThenSetRcs) {
HardwareInfo hwInfo = *defaultHwInfo;
hwInfo.featureTable.flags.ftrCCSNode = true;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -249,7 +249,7 @@ DG2TEST_F(ProductHelperTestDg2, whenAdjustingDefaultEngineTypeThenSelectEngineTy
hwInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(revision, hwInfo);
hwInfo.platform.usDeviceID = deviceId;
hwInfo.capabilityTable.defaultEngineType = defaultHwInfo->capabilityTable.defaultEngineType;
gfxCoreHelper.adjustDefaultEngineType(&hwInfo, productHelper);
gfxCoreHelper.adjustDefaultEngineType(&hwInfo, productHelper, nullptr);
if (DG2::isG10(hwInfo) && revision < REVISION_B) {
EXPECT_EQ(aub_stream::ENGINE_RCS, hwInfo.capabilityTable.defaultEngineType);
} else {