refactor: fix isDirectSubmissionSupported xe_hpg helper

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2023-09-04 08:34:41 +00:00
committed by Compute-Runtime-Automation
parent a10f6d9196
commit b7ed51ad71
5 changed files with 19 additions and 9 deletions

View File

@@ -12,4 +12,11 @@ constexpr static auto gfxProduct = IGFX_METEORLAKE;
#include "shared/source/xe_hpg_core/xe_lpg/linux/product_helper_xe_lpg_linux.inl"
#include "shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl"
namespace NEO {
template <>
bool ProductHelperHw<gfxProduct>::isDirectSubmissionSupported(const HardwareInfo &hwInfo) const {
return true;
}
} // namespace NEO
template class NEO::ProductHelperHw<gfxProduct>;

View File

@@ -12,4 +12,11 @@ constexpr static auto gfxProduct = IGFX_METEORLAKE;
#include "shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl"
#include "shared/source/xe_hpg_core/xe_lpg/windows/product_helper_xe_lpg_windows.inl"
namespace NEO {
template <>
bool ProductHelperHw<gfxProduct>::isDirectSubmissionSupported(const HardwareInfo &hwInfo) const {
return true;
}
} // namespace NEO
template class NEO::ProductHelperHw<gfxProduct>;

View File

@@ -69,11 +69,6 @@ bool ProductHelperHw<gfxProduct>::isCachingOnCpuAvailable() const {
return false;
}
template <>
bool ProductHelperHw<gfxProduct>::isDirectSubmissionSupported(const HardwareInfo &hwInfo) const {
return true;
}
template <>
bool ProductHelperHw<gfxProduct>::isResolveDependenciesByPipeControlsSupported(const HardwareInfo &hwInfo, bool isOOQ, TaskCountType queueTaskCount, const CommandStreamReceiver &queueCsr) const {
const bool enabled = !isOOQ && queueTaskCount == queueCsr.peekTaskCount();

View File

@@ -6,6 +6,7 @@
*/
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/os_interface/product_helper.h"
#include "shared/source/xe_hpg_core/hw_cmds_mtl.h"
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
#include "shared/test/common/test_macros/test.h"
@@ -20,3 +21,7 @@ using MtlProductHelper = ProductHelperTest;
MTLTEST_F(MtlProductHelper, givenCompilerProductHelperWhenGetDefaultHwIpVersionThenCorrectValueIsSet) {
EXPECT_EQ(compilerProductHelper->getDefaultHwIpVersion(), AOT::MTL_M_A0);
}
MTLTEST_F(MtlProductHelper, givenProductHelperWhenCheckDirectSubmissionSupportedThenTrueIsReturned) {
EXPECT_TRUE(productHelper->isDirectSubmissionSupported(*defaultHwInfo));
}

View File

@@ -198,10 +198,6 @@ HWTEST2_F(XeLpgProductHelperTests, whenGettingAubstreamProductFamilyThenProperEn
EXPECT_EQ(aub_stream::ProductFamily::Mtl, productHelper->getAubStreamProductFamily());
}
HWTEST2_F(XeLpgProductHelperTests, givenProductHelperWhenCheckDirectSubmissionSupportedThenTrueIsReturned, IsXeLpg) {
EXPECT_TRUE(productHelper->isDirectSubmissionSupported(*defaultHwInfo));
}
HWTEST2_F(XeLpgProductHelperTests, givenProductHelperWhenCheckDirectSubmissionConstantCacheInvalidationNeededThenTrueIsReturned, IsXeLpg) {
auto hwInfo = *defaultHwInfo;
EXPECT_TRUE(productHelper->isDirectSubmissionConstantCacheInvalidationNeeded(hwInfo));