From d07c76c237077b1f882b06cfe3b10e947ef0b59d Mon Sep 17 00:00:00 2001 From: Bartosz Dunajski Date: Thu, 9 Dec 2021 12:09:57 +0000 Subject: [PATCH] unTypedDataPortCacheFlush pipe_control helper support Signed-off-by: Bartosz Dunajski --- .../hardware_commands_helper_xehp_and_later.inl | 2 +- opencl/test/unit_test/helpers/hw_helper_tests.cpp | 4 ++-- .../helpers/hw_helper_tests_dg2_and_later.cpp | 4 ++-- shared/source/helpers/CMakeLists.txt | 1 - .../helpers/definitions/pipe_control_args.h | 1 - shared/source/helpers/hw_helper.h | 4 ++-- shared/source/helpers/hw_helper_bdw_and_later.inl | 2 +- shared/source/helpers/hw_helper_dg2_and_later.inl | 2 +- shared/source/helpers/pipe_control_args.cpp | 15 --------------- shared/source/xe_hp_core/hw_helper_xe_hp_core.cpp | 2 +- 10 files changed, 10 insertions(+), 27 deletions(-) delete mode 100644 shared/source/helpers/pipe_control_args.cpp diff --git a/opencl/source/helpers/hardware_commands_helper_xehp_and_later.inl b/opencl/source/helpers/hardware_commands_helper_xehp_and_later.inl index 49913e1ca8..f7368ba2c5 100644 --- a/opencl/source/helpers/hardware_commands_helper_xehp_and_later.inl +++ b/opencl/source/helpers/hardware_commands_helper_xehp_and_later.inl @@ -148,7 +148,7 @@ void HardwareCommandsHelper::programCacheFlushAfterWalkerCommand(Line // 1. make sure previous kernel finished PipeControlArgs args; auto &hardwareInfo = commandQueue.getDevice().getHardwareInfo(); - args.adjustArgs(hardwareInfo); + args.unTypedDataPortCacheFlush = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily).unTypedDataPortCacheFlushRequired(); MemorySynchronizationCommands::addPipeControl(*commandStream, args); diff --git a/opencl/test/unit_test/helpers/hw_helper_tests.cpp b/opencl/test/unit_test/helpers/hw_helper_tests.cpp index 449d00c89c..97c858ab0e 100644 --- a/opencl/test/unit_test/helpers/hw_helper_tests.cpp +++ b/opencl/test/unit_test/helpers/hw_helper_tests.cpp @@ -1325,9 +1325,9 @@ HWTEST_F(HwHelperTest, whenIsSipKernelAsHexadecimalArrayPreferredIsCalledThenRet } using isXeHpCoreOrBelow = IsAtMostProduct; -HWTEST2_F(HwHelperTest, givenXeHPAndBelowPlatformWhenCheckingIfAdditionalPipeControlArgsAreRequiredThenReturnFalse, isXeHpCoreOrBelow) { +HWTEST2_F(HwHelperTest, givenXeHPAndBelowPlatformWhenCheckingIfUnTypedDataPortCacheFlushRequiredThenReturnFalse, isXeHpCoreOrBelow) { const auto &hwHelper = HwHelper::get(renderCoreFamily); - EXPECT_FALSE(hwHelper.additionalPipeControlArgsRequired()); + EXPECT_FALSE(hwHelper.unTypedDataPortCacheFlushRequired()); } HWTEST2_F(HwHelperTest, givenXeHPAndBelowPlatformPlatformWhenCheckingIfEngineTypeRemappingIsRequiredThenReturnFalse, isXeHpCoreOrBelow) { diff --git a/opencl/test/unit_test/helpers/hw_helper_tests_dg2_and_later.cpp b/opencl/test/unit_test/helpers/hw_helper_tests_dg2_and_later.cpp index 3ac2754a71..162bdd6052 100644 --- a/opencl/test/unit_test/helpers/hw_helper_tests_dg2_and_later.cpp +++ b/opencl/test/unit_test/helpers/hw_helper_tests_dg2_and_later.cpp @@ -150,9 +150,9 @@ HWTEST2_F(PipeControlHelperTestsDg2AndLater, givenDebugDisableCacheFlushWhenProg EXPECT_FALSE(pipeControl->getCompressionControlSurfaceCcsFlush()); } -HWTEST2_F(HwHelperTestsDg2AndLater, givenXeHPGAndLaterPlatformWhenCheckingIfUntypedDataPortCacheFlushIsRequiredThenReturnTrue, IsAtLeastXeHpgCore) { +HWTEST2_F(HwHelperTestsDg2AndLater, givenXeHPGAndLaterPlatformWhenCheckingIfUnTypedDataPortCacheFlushRequiredThenReturnTrue, IsAtLeastXeHpgCore) { auto &hwHelper = HwHelper::get(renderCoreFamily); - EXPECT_TRUE(hwHelper.additionalPipeControlArgsRequired()); + EXPECT_TRUE(hwHelper.unTypedDataPortCacheFlushRequired()); } using HwInfoConfigTestDg2AndLater = ::testing::Test; diff --git a/shared/source/helpers/CMakeLists.txt b/shared/source/helpers/CMakeLists.txt index ac30d8ce59..bb7afcd247 100644 --- a/shared/source/helpers/CMakeLists.txt +++ b/shared/source/helpers/CMakeLists.txt @@ -130,7 +130,6 @@ set(NEO_CORE_HELPERS ${CMAKE_CURRENT_SOURCE_DIR}/definitions/mi_flush_args.h ${CMAKE_CURRENT_SOURCE_DIR}/definitions/pipe_control_args_base.h ${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}pipe_control_args.h - ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}pipe_control_args.cpp ) if(SUPPORT_XEHP_AND_LATER) diff --git a/shared/source/helpers/definitions/pipe_control_args.h b/shared/source/helpers/definitions/pipe_control_args.h index 91e85398b2..cc77900cd4 100644 --- a/shared/source/helpers/definitions/pipe_control_args.h +++ b/shared/source/helpers/definitions/pipe_control_args.h @@ -14,6 +14,5 @@ struct HardwareInfo; struct PipeControlArgs : PipeControlArgsBase { PipeControlArgs() = default; PipeControlArgs(bool dcFlush) : PipeControlArgsBase(dcFlush) {} - void adjustArgs(const HardwareInfo &hwInfo); }; } // namespace NEO diff --git a/shared/source/helpers/hw_helper.h b/shared/source/helpers/hw_helper.h index d94f32027b..dd4e7a2650 100644 --- a/shared/source/helpers/hw_helper.h +++ b/shared/source/helpers/hw_helper.h @@ -132,7 +132,7 @@ class HwHelper { virtual size_t getSingleTimestampPacketSize() const = 0; virtual void applyAdditionalCompressionSettings(Gmm &gmm, bool isNotCompressed) const = 0; virtual void applyRenderCompressionFlag(Gmm &gmm, uint32_t isCompressed) const = 0; - virtual bool additionalPipeControlArgsRequired() const = 0; + virtual bool unTypedDataPortCacheFlushRequired() const = 0; virtual bool isEngineTypeRemappingToHwSpecificRequired() const = 0; static uint32_t getSubDevicesCount(const HardwareInfo *pHwInfo); @@ -363,7 +363,7 @@ class HwHelperHw : public HwHelper { void applyRenderCompressionFlag(Gmm &gmm, uint32_t isCompressed) const override; - bool additionalPipeControlArgsRequired() const override; + bool unTypedDataPortCacheFlushRequired() const override; bool isAssignEngineRoundRobinSupported() const override; diff --git a/shared/source/helpers/hw_helper_bdw_and_later.inl b/shared/source/helpers/hw_helper_bdw_and_later.inl index 8c8aa3c460..ca136c7281 100644 --- a/shared/source/helpers/hw_helper_bdw_and_later.inl +++ b/shared/source/helpers/hw_helper_bdw_and_later.inl @@ -126,7 +126,7 @@ inline void MemorySynchronizationCommands::setPipeControlWAFlags(PIPE } template -bool HwHelperHw::additionalPipeControlArgsRequired() const { +bool HwHelperHw::unTypedDataPortCacheFlushRequired() const { return false; } diff --git a/shared/source/helpers/hw_helper_dg2_and_later.inl b/shared/source/helpers/hw_helper_dg2_and_later.inl index 7e54a32b1c..8e7e5b703b 100644 --- a/shared/source/helpers/hw_helper_dg2_and_later.inl +++ b/shared/source/helpers/hw_helper_dg2_and_later.inl @@ -54,7 +54,7 @@ void MemorySynchronizationCommands::setPipeControlWAFlags(PIPE_CONTROL & } template <> -bool HwHelperHw::additionalPipeControlArgsRequired() const { +bool HwHelperHw::unTypedDataPortCacheFlushRequired() const { return true; } diff --git a/shared/source/helpers/pipe_control_args.cpp b/shared/source/helpers/pipe_control_args.cpp deleted file mode 100644 index 497b3fbfaa..0000000000 --- a/shared/source/helpers/pipe_control_args.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (C) 2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "pipe_control_args.h" - -#include "shared/source/helpers/hw_info.h" - -namespace NEO { -void PipeControlArgs::adjustArgs(const HardwareInfo &hwInfo) { -} -} // namespace NEO diff --git a/shared/source/xe_hp_core/hw_helper_xe_hp_core.cpp b/shared/source/xe_hp_core/hw_helper_xe_hp_core.cpp index fbc5acd02c..e4ac8d0fb1 100644 --- a/shared/source/xe_hp_core/hw_helper_xe_hp_core.cpp +++ b/shared/source/xe_hp_core/hw_helper_xe_hp_core.cpp @@ -145,7 +145,7 @@ void MemorySynchronizationCommands::setCacheFlushExtraProperties(PipeCon } template <> -bool HwHelperHw::additionalPipeControlArgsRequired() const { +bool HwHelperHw::unTypedDataPortCacheFlushRequired() const { return false; }