mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 19:32:25 +08:00
Unify flush task getter implementation of product and core helpers
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
0e1ba33e07
commit
783df81a44
@@ -252,40 +252,7 @@ class CommandListImmediateFlushTaskTests : public DeviceFixture {
|
|||||||
};
|
};
|
||||||
|
|
||||||
using CommandListImmediateFlushTaskComputeTests = Test<CommandListImmediateFlushTaskTests>;
|
using CommandListImmediateFlushTaskComputeTests = Test<CommandListImmediateFlushTaskTests>;
|
||||||
HWTEST2_F(CommandListImmediateFlushTaskComputeTests, givenDG2CommandListIsInititalizedThenByDefaultFlushTaskSubmissionEnabled, IsDG2) {
|
HWTEST_F(CommandListImmediateFlushTaskComputeTests, givenImmediateCommandListIsInititalizedThenByDefaultFlushTaskSubmissionEnabled) {
|
||||||
ze_command_queue_desc_t queueDesc = {};
|
|
||||||
ze_result_t returnValue;
|
|
||||||
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, device, &queueDesc, false, NEO::EngineGroupType::Compute, returnValue));
|
|
||||||
|
|
||||||
EXPECT_EQ(true, commandList->isFlushTaskSubmissionEnabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
HWTEST2_F(CommandListImmediateFlushTaskComputeTests, givenMTLCommandListIsInititalizedThenByDefaultFlushTaskSubmissionDisabled, IsMTL) {
|
|
||||||
ze_command_queue_desc_t queueDesc = {};
|
|
||||||
ze_result_t returnValue;
|
|
||||||
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, device, &queueDesc, false, NEO::EngineGroupType::Compute, returnValue));
|
|
||||||
|
|
||||||
EXPECT_EQ(false, commandList->isFlushTaskSubmissionEnabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
HWTEST2_F(CommandListImmediateFlushTaskComputeTests, givenXeHPCommandListIsInititalizedThenByDefaultFlushTaskSubmissionEnabled, IsXEHP) {
|
|
||||||
ze_command_queue_desc_t queueDesc = {};
|
|
||||||
ze_result_t returnValue;
|
|
||||||
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, device, &queueDesc, false, NEO::EngineGroupType::Compute, returnValue));
|
|
||||||
|
|
||||||
EXPECT_EQ(true, commandList->isFlushTaskSubmissionEnabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
using MatchXeHpc = IsGfxCore<IGFX_XE_HPC_CORE>;
|
|
||||||
HWTEST2_F(CommandListImmediateFlushTaskComputeTests, givenXeHPCCommandListIsInititalizedThenByDefaultFlushTaskSubmissionEnabled, MatchXeHpc) {
|
|
||||||
ze_command_queue_desc_t queueDesc = {};
|
|
||||||
ze_result_t returnValue;
|
|
||||||
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, device, &queueDesc, false, NEO::EngineGroupType::Compute, returnValue));
|
|
||||||
|
|
||||||
EXPECT_EQ(true, commandList->isFlushTaskSubmissionEnabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
HWTEST2_F(CommandListImmediateFlushTaskComputeTests, givenCommandListIsInititalizedThenByDefaultFlushTaskSubmissionDisabled, IsAtMostGen12lp) {
|
|
||||||
ze_command_queue_desc_t queueDesc = {};
|
ze_command_queue_desc_t queueDesc = {};
|
||||||
ze_result_t returnValue;
|
ze_result_t returnValue;
|
||||||
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, device, &queueDesc, false, NEO::EngineGroupType::Compute, returnValue));
|
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, device, &queueDesc, false, NEO::EngineGroupType::Compute, returnValue));
|
||||||
|
|||||||
@@ -21,11 +21,6 @@ bool ProductHelperHw<gfxProduct>::isDcFlushAllowed() const {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
|
||||||
bool ProductHelperHw<gfxProduct>::isFlushTaskAllowed() const {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
bool ProductHelperHw<gfxProduct>::isTimestampWaitSupportedForEvents() const {
|
bool ProductHelperHw<gfxProduct>::isTimestampWaitSupportedForEvents() const {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -181,11 +181,6 @@ uint32_t ProductHelperHw<gfxProduct>::computeMaxNeededSubSliceSpace(const Hardwa
|
|||||||
return maxSubSlice;
|
return maxSubSlice;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
|
||||||
bool ProductHelperHw<gfxProduct>::isFlushTaskAllowed() const {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
bool ProductHelperHw<gfxProduct>::programAllStateComputeCommandFields() const {
|
bool ProductHelperHw<gfxProduct>::programAllStateComputeCommandFields() const {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -124,9 +124,4 @@ uint64_t ProductHelperHw<gfxProduct>::overridePatIndex(AllocationType allocation
|
|||||||
return patIndex;
|
return patIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
|
||||||
bool ProductHelperHw<gfxProduct>::isFlushTaskAllowed() const {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|||||||
@@ -1278,19 +1278,7 @@ HWTEST_F(GfxCoreHelperTest, givenGfxCoreHelperWhenGettingIfRevisionSpecificBinar
|
|||||||
EXPECT_FALSE(gfxCoreHelper.isRevisionSpecificBinaryBuiltinRequired());
|
EXPECT_FALSE(gfxCoreHelper.isRevisionSpecificBinaryBuiltinRequired());
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST2_F(GfxCoreHelperTest, givenDG2GfxCoreHelperWhenGettingIsPlatformFlushTaskEnabledThenTrueIsReturned, IsDG2) {
|
HWTEST_F(GfxCoreHelperTest, givenGfxCoreHelperWhenGettingIsPlatformFlushTaskEnabledThenTrueIsReturned) {
|
||||||
const auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
|
|
||||||
auto &productHelper = getHelper<ProductHelper>();
|
|
||||||
EXPECT_TRUE(gfxCoreHelper.isPlatformFlushTaskEnabled(productHelper));
|
|
||||||
}
|
|
||||||
|
|
||||||
HWTEST2_F(GfxCoreHelperTest, givenPvcGfxCoreHelperWhenGettingIsPlatformFlushTaskEnabledThenTrueIsReturned, IsPVC) {
|
|
||||||
const auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
|
|
||||||
auto &productHelper = getHelper<ProductHelper>();
|
|
||||||
EXPECT_TRUE(gfxCoreHelper.isPlatformFlushTaskEnabled(productHelper));
|
|
||||||
}
|
|
||||||
|
|
||||||
HWTEST2_F(GfxCoreHelperTest, givenAtMostGen12lpGfxCoreHelperWhenGettingIsPlatformFlushTaskEnabledThenFalseIsReturned, IsAtMostGen12lp) {
|
|
||||||
const auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
|
const auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
|
||||||
auto &productHelper = getHelper<ProductHelper>();
|
auto &productHelper = getHelper<ProductHelper>();
|
||||||
EXPECT_TRUE(gfxCoreHelper.isPlatformFlushTaskEnabled(productHelper));
|
EXPECT_TRUE(gfxCoreHelper.isPlatformFlushTaskEnabled(productHelper));
|
||||||
|
|||||||
Reference in New Issue
Block a user