Fix: enable split taskcount from wait only on dg2

Related-To: NEO-6948

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2022-05-13 12:04:24 +00:00
committed by Compute-Runtime-Automation
parent aae107fb00
commit 5dcdf53d12
16 changed files with 49 additions and 14 deletions

View File

@ -681,9 +681,10 @@ bool Event::isCompleted() {
}
bool Event::isWaitForTimestampsEnabled() const {
const auto &hwHelper = HwHelper::get(cmdQueue->getDevice().getHardwareInfo().platform.eRenderCoreFamily);
const auto &hwInfo = cmdQueue->getDevice().getHardwareInfo();
const auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
auto enabled = cmdQueue->isTimestampWaitEnabled();
enabled &= hwHelper.isTimestampWaitSupportedForEvents();
enabled &= hwHelper.isTimestampWaitSupportedForEvents(hwInfo);
switch (DebugManager.flags.EnableTimestampWaitForEvents.get()) {
case 0:

View File

@ -1834,8 +1834,9 @@ TEST(EventTimestampTest, givenEnableTimestampWaitWhenCheckIsTimestampWaitEnabled
{
DebugManager.flags.EnableTimestampWaitForEvents.set(-1);
const auto &hwHelper = HwHelper::get(mockDevice->getHardwareInfo().platform.eRenderCoreFamily);
EXPECT_EQ(event.isWaitForTimestampsEnabled(), hwHelper.isTimestampWaitSupportedForEvents());
const auto &hwInfo = mockDevice->getHardwareInfo();
const auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
EXPECT_EQ(event.isWaitForTimestampsEnabled(), hwHelper.isTimestampWaitSupportedForEvents(hwInfo));
}
{

View File

@ -400,3 +400,8 @@ HWTEST2_F(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfUseChannelRedForUnusedSh
const auto &hwInfoConfig = *HwInfoConfig::get(pInHwInfo.platform.eProductFamily);
EXPECT_TRUE(hwInfoConfig.useChannelRedForUnusedShaderChannels());
}
HWTEST2_F(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfIsTimestampWaitSupportedForEventsThenFalseIsReturned, IsNotXeHpgCore) {
const auto &hwInfoConfig = *HwInfoConfig::get(pInHwInfo.platform.eProductFamily);
EXPECT_FALSE(hwInfoConfig.isTimestampWaitSupportedForEvents());
}

View File

@ -64,7 +64,7 @@ class HwHelper {
static bool cacheFlushAfterWalkerSupported(const HardwareInfo &hwInfo);
virtual bool timestampPacketWriteSupported() const = 0;
virtual bool isTimestampWaitSupportedForQueues() const = 0;
virtual bool isTimestampWaitSupportedForEvents() const = 0;
virtual bool isTimestampWaitSupportedForEvents(const HardwareInfo &hwInfo) const = 0;
virtual bool isUpdateTaskCountFromWaitSupported() const = 0;
virtual size_t getRenderSurfaceStateSize() const = 0;
virtual void setRenderSurfaceStateForBuffer(const RootDeviceEnvironment &rootDeviceEnvironment,
@ -250,7 +250,7 @@ class HwHelperHw : public HwHelper {
bool isTimestampWaitSupportedForQueues() const override;
bool isTimestampWaitSupportedForEvents() const override;
bool isTimestampWaitSupportedForEvents(const HardwareInfo &hwInfo) const override;
bool isUpdateTaskCountFromWaitSupported() const override;

View File

@ -46,7 +46,7 @@ bool HwHelperHw<GfxFamily>::isTimestampWaitSupportedForQueues() const {
}
template <typename GfxFamily>
bool HwHelperHw<GfxFamily>::isTimestampWaitSupportedForEvents() const {
bool HwHelperHw<GfxFamily>::isTimestampWaitSupportedForEvents(const HardwareInfo &hwInfo) const {
return false;
}

View File

@ -61,7 +61,7 @@ bool HwHelperHw<GfxFamily>::isTimestampWaitSupportedForQueues() const {
}
template <typename GfxFamily>
bool HwHelperHw<GfxFamily>::isTimestampWaitSupportedForEvents() const {
bool HwHelperHw<GfxFamily>::isTimestampWaitSupportedForEvents(const HardwareInfo &hwInfo) const {
return false;
}

View File

@ -103,6 +103,7 @@ class HwInfoConfig {
virtual bool isIpSamplingSupported(const NEO::HardwareInfo &hwInfo) const = 0;
virtual bool isGrfNumReportedWithScm() const = 0;
virtual bool isCooperativeEngineSupported(const HardwareInfo &hwInfo) const = 0;
virtual bool isTimestampWaitSupportedForEvents() const = 0;
MOCKABLE_VIRTUAL ~HwInfoConfig() = default;
@ -190,6 +191,7 @@ class HwInfoConfigHw : public HwInfoConfig {
bool isIpSamplingSupported(const NEO::HardwareInfo &hwInfo) const override;
bool isGrfNumReportedWithScm() const override;
bool isCooperativeEngineSupported(const HardwareInfo &hwInfo) const override;
bool isTimestampWaitSupportedForEvents() const override;
protected:
HwInfoConfigHw() = default;

View File

@ -362,4 +362,9 @@ bool HwInfoConfigHw<gfxProduct>::isCooperativeEngineSupported(const HardwareInfo
return false;
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::isTimestampWaitSupportedForEvents() const {
return false;
}
} // namespace NEO

View File

@ -450,7 +450,7 @@ bool HwHelperHw<Family>::isTimestampWaitSupportedForQueues() const {
}
template <>
bool HwHelperHw<Family>::isTimestampWaitSupportedForEvents() const {
bool HwHelperHw<Family>::isTimestampWaitSupportedForEvents(const HardwareInfo &hwInfo) const {
return true;
}

View File

@ -175,3 +175,8 @@ template <>
bool HwInfoConfigHw<gfxProduct>::programAllStateComputeCommandFields() const {
return true;
}
template <>
bool HwInfoConfigHw<gfxProduct>::isTimestampWaitSupportedForEvents() const {
return true;
}

View File

@ -131,8 +131,9 @@ inline bool HwHelperHw<Family>::isLinuxCompletionFenceSupported() const {
}
template <>
bool HwHelperHw<Family>::isTimestampWaitSupportedForEvents() const {
return true;
bool HwHelperHw<Family>::isTimestampWaitSupportedForEvents(const HardwareInfo &hwInfo) const {
auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
return hwInfoConfig.isTimestampWaitSupportedForEvents();
}
template class HwHelperHw<Family>;

View File

@ -365,4 +365,9 @@ bool HwInfoConfigHw<IGFX_UNKNOWN>::isCooperativeEngineSupported(const HardwareIn
return false;
}
template <>
bool HwInfoConfigHw<IGFX_UNKNOWN>::isTimestampWaitSupportedForEvents() const {
return false;
}
} //namespace NEO

View File

@ -16,6 +16,7 @@ using IsXeHpCore = IsGfxCore<IGFX_XE_HP_CORE>;
using IsXeHpgCore = IsGfxCore<IGFX_XE_HPG_CORE>;
using IsXeHpcCore = IsGfxCore<IGFX_XE_HPC_CORE>;
using IsNotXeHpcCore = IsNotGfxCore<IGFX_XE_HPC_CORE>;
using IsNotXeHpgCore = IsNotGfxCore<IGFX_XE_HPG_CORE>;
using IsAtMostGen11 = IsAtMostGfxCore<IGFX_GEN11LP_CORE>;

View File

@ -62,7 +62,7 @@ XE_HPC_CORETEST_F(HwHelperXeHpcCoreTest, givenHwHelperWhenGettingIfRevisionSpeci
XE_HPC_CORETEST_F(HwHelperXeHpcCoreTest, givenHwHelperWhenCheckTimestampWaitSupportThenReturnTrue) {
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_TRUE(helper.isTimestampWaitSupportedForQueues());
EXPECT_TRUE(helper.isTimestampWaitSupportedForEvents());
EXPECT_TRUE(helper.isTimestampWaitSupportedForEvents(*defaultHwInfo));
}
XE_HPC_CORETEST_F(HwHelperXeHpcCoreTest, givenXeHPCPlatformWhenCheckAssignEngineRoundRobinSupportedThenReturnTrue) {

View File

@ -378,6 +378,15 @@ DG2TEST_F(HwInfoConfigTestDg2, givenNotEnabledSliceWhenComputeUnitsUsedForScratc
EXPECT_THROW(hwHelper.getComputeUnitsUsedForScratch(&hwInfo), std::exception);
}
HWTEST_EXCLUDE_PRODUCT(HwHelperTestXeHpgCore, givenHwHelperWhenCheckTimestampWaitSupportThenReturnFalse, IGFX_DG2);
DG2TEST_F(HwInfoConfigTestDg2, givenDG2WhenCheckingIsTimestampWaitSupportedForEventsThenReturnTrue) {
HardwareInfo hwInfo = *defaultHwInfo;
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
EXPECT_TRUE(hwInfoConfig.isTimestampWaitSupportedForEvents());
EXPECT_TRUE(hwHelper.isTimestampWaitSupportedForEvents(hwInfo));
}
DG2TEST_F(ProductConfigTests, givenDg2G10DeviceIdsWhenConfigIsCheckedThenCorrectValueIsReturned) {
for (const auto &deviceId : DG2_G10_IDS) {
hwInfo.platform.usDeviceID = deviceId;

View File

@ -127,10 +127,10 @@ XE_HPG_CORETEST_F(HwHelperTestXeHpgCore, givenXeHPAndLaterPlatformWhenCheckAssig
EXPECT_FALSE(hwHelper.isAssignEngineRoundRobinSupported());
}
XE_HPG_CORETEST_F(HwHelperTestXeHpgCore, givenHwHelperWhenCheckTimestampWaitSupportThenReturnFalseForQueuesButTrueForEvents) {
XE_HPG_CORETEST_F(HwHelperTestXeHpgCore, givenHwHelperWhenCheckTimestampWaitSupportThenReturnFalse) {
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_FALSE(helper.isTimestampWaitSupportedForQueues());
EXPECT_TRUE(helper.isTimestampWaitSupportedForEvents());
EXPECT_FALSE(helper.isTimestampWaitSupportedForEvents(*defaultHwInfo));
}
XE_HPG_CORETEST_F(HwHelperTestXeHpgCore, givenDisablePipeControlFlagIsEnabledWhenLocalMemoryIsEnabledThenReturnTrueAndProgramPipeControl) {