From 51e073af73acf5d76ac4304a462f2c8c92c8d039 Mon Sep 17 00:00:00 2001 From: Maciej Plewka Date: Thu, 4 Feb 2021 16:42:41 +0000 Subject: [PATCH] Revert "Extra checks for gen12lp" Signed-off-by: Maciej Plewka --- opencl/test/unit_test/helpers/hw_helper_tests.cpp | 8 -------- opencl/test/unit_test/mocks/mock_wddm.cpp | 4 ++-- opencl/test/unit_test/mocks/mock_wddm.h | 3 +-- shared/source/gen12lp/hw_helper_gen12lp.cpp | 5 ----- shared/source/helpers/hw_helper.h | 3 --- shared/source/helpers/hw_helper_base.inl | 5 ----- shared/source/os_interface/windows/wddm/wddm.cpp | 3 +-- shared/source/os_interface/windows/wddm/wddm.h | 2 +- .../windows/wddm_additional_context_flags.cpp | 2 +- 9 files changed, 6 insertions(+), 29 deletions(-) diff --git a/opencl/test/unit_test/helpers/hw_helper_tests.cpp b/opencl/test/unit_test/helpers/hw_helper_tests.cpp index 108153485e..9b13d1854a 100644 --- a/opencl/test/unit_test/helpers/hw_helper_tests.cpp +++ b/opencl/test/unit_test/helpers/hw_helper_tests.cpp @@ -1191,11 +1191,3 @@ TEST_F(HwHelperTest, WhenGettingIsCpuImageTransferPreferredThenFalseIsReturned) auto &hwHelper = HwHelper::get(renderCoreFamily); EXPECT_FALSE(hwHelper.isCpuImageTransferPreferred(*defaultHwInfo)); } - -TEST_F(HwHelperTest, whenFtrGpGpuMidThreadLevelPreemptFeatureDisabledThenFalseIsReturned) { - HwHelper &hwHelper = HwHelper::get(renderCoreFamily); - FeatureTable featureTable = {}; - featureTable.ftrGpGpuMidThreadLevelPreempt = false; - bool result = hwHelper.isAdditionalFeatureFlagRequired(&featureTable); - EXPECT_FALSE(result); -} diff --git a/opencl/test/unit_test/mocks/mock_wddm.cpp b/opencl/test/unit_test/mocks/mock_wddm.cpp index 086a7d6ea6..7012bd63fe 100644 --- a/opencl/test/unit_test/mocks/mock_wddm.cpp +++ b/opencl/test/unit_test/mocks/mock_wddm.cpp @@ -153,9 +153,9 @@ bool WddmMock::createContext(OsContextWin &osContext) { return createContextResult.success = Wddm::createContext(osContext); } -void WddmMock::applyAdditionalContextFlags(CREATECONTEXT_PVTDATA &privateData, OsContextWin &osContext, const HardwareInfo &hwInfo) { +void WddmMock::applyAdditionalContextFlags(CREATECONTEXT_PVTDATA &privateData, OsContextWin &osContext) { applyAdditionalContextFlagsResult.called++; - Wddm::applyAdditionalContextFlags(privateData, osContext, hwInfo); + Wddm::applyAdditionalContextFlags(privateData, osContext); } bool WddmMock::destroyContext(D3DKMT_HANDLE context) { diff --git a/opencl/test/unit_test/mocks/mock_wddm.h b/opencl/test/unit_test/mocks/mock_wddm.h index 2cf80a0b3f..9de18f715c 100644 --- a/opencl/test/unit_test/mocks/mock_wddm.h +++ b/opencl/test/unit_test/mocks/mock_wddm.h @@ -8,7 +8,6 @@ #pragma once #include "shared/source/helpers/constants.h" -#include "shared/source/helpers/hw_info.h" #include "shared/source/memory_manager/host_ptr_defines.h" #include "shared/source/os_interface/windows/wddm/wddm.h" #include "shared/source/os_interface/windows/wddm_residency_allocations_container.h" @@ -66,7 +65,7 @@ class WddmMock : public Wddm { bool destroyAllocation(WddmAllocation *alloc, OsContextWin *osContext); bool openSharedHandle(D3DKMT_HANDLE handle, WddmAllocation *alloc) override; bool createContext(OsContextWin &osContext) override; - void applyAdditionalContextFlags(CREATECONTEXT_PVTDATA &privateData, OsContextWin &osContext, const HardwareInfo &hwInfo) override; + void applyAdditionalContextFlags(CREATECONTEXT_PVTDATA &privateData, OsContextWin &osContext) override; bool destroyContext(D3DKMT_HANDLE context) override; bool queryAdapterInfo() override; bool submit(uint64_t commandBuffer, size_t size, void *commandHeader, WddmSubmitArguments &submitArguments) override; diff --git a/shared/source/gen12lp/hw_helper_gen12lp.cpp b/shared/source/gen12lp/hw_helper_gen12lp.cpp index 5851ab2840..95937a95eb 100644 --- a/shared/source/gen12lp/hw_helper_gen12lp.cpp +++ b/shared/source/gen12lp/hw_helper_gen12lp.cpp @@ -51,11 +51,6 @@ bool HwHelperHw::isWaDisableRccRhwoOptimizationRequired() const { return true; } -template <> -bool HwHelperHw::isAdditionalFeatureFlagRequired(const FeatureTable *featureTable) const { - return featureTable->ftrGpGpuMidThreadLevelPreempt; -} - template <> uint32_t HwHelperHw::getComputeUnitsUsedForScratch(const HardwareInfo *pHwInfo) const { /* For ICL+ maxThreadCount equals (EUCount * 8). diff --git a/shared/source/helpers/hw_helper.h b/shared/source/helpers/hw_helper.h index 2649be190c..3374e60624 100644 --- a/shared/source/helpers/hw_helper.h +++ b/shared/source/helpers/hw_helper.h @@ -102,7 +102,6 @@ class HwHelper { virtual bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) = 0; virtual bool isWaDisableRccRhwoOptimizationRequired() const = 0; - virtual bool isAdditionalFeatureFlagRequired(const FeatureTable *featureTable) const = 0; virtual uint32_t getMinimalSIMDSize() = 0; virtual uint32_t getHwRevIdFromStepping(uint32_t stepping, const HardwareInfo &hwInfo) const = 0; virtual uint32_t getSteppingFromHwRevId(uint32_t hwRevId, const HardwareInfo &hwInfo) const = 0; @@ -283,8 +282,6 @@ class HwHelperHw : public HwHelper { bool isWaDisableRccRhwoOptimizationRequired() const override; - bool isAdditionalFeatureFlagRequired(const FeatureTable *featureTable) const override; - uint32_t getMinimalSIMDSize() override; uint64_t getGpuTimeStampInNS(uint64_t timeStamp, double frequency) const override; diff --git a/shared/source/helpers/hw_helper_base.inl b/shared/source/helpers/hw_helper_base.inl index 5eab340ea8..4a2a2118b2 100644 --- a/shared/source/helpers/hw_helper_base.inl +++ b/shared/source/helpers/hw_helper_base.inl @@ -534,9 +534,4 @@ bool HwHelperHw::isSipWANeeded(const HardwareInfo &hwInfo) const { return false; } -template -bool HwHelperHw::isAdditionalFeatureFlagRequired(const FeatureTable *featureTable) const { - return false; -} - } // namespace NEO diff --git a/shared/source/os_interface/windows/wddm/wddm.cpp b/shared/source/os_interface/windows/wddm/wddm.cpp index e20e410616..62159f0649 100644 --- a/shared/source/os_interface/windows/wddm/wddm.cpp +++ b/shared/source/os_interface/windows/wddm/wddm.cpp @@ -763,8 +763,7 @@ bool Wddm::createContext(OsContextWin &osContext) { PrivateData.pHwContextId = &hwContextId; PrivateData.IsMediaUsage = false; PrivateData.NoRingFlushes = DebugManager.flags.UseNoRingFlushesKmdMode.get(); - auto &rootDeviceEnvironment = this->getRootDeviceEnvironment(); - applyAdditionalContextFlags(PrivateData, osContext, *rootDeviceEnvironment.getHardwareInfo()); + applyAdditionalContextFlags(PrivateData, osContext); CreateContext.EngineAffinity = 0; CreateContext.Flags.NullRendering = static_cast(DebugManager.flags.EnableNullHardware.get()); diff --git a/shared/source/os_interface/windows/wddm/wddm.h b/shared/source/os_interface/windows/wddm/wddm.h index 13ce15093a..05bc27397d 100644 --- a/shared/source/os_interface/windows/wddm/wddm.h +++ b/shared/source/os_interface/windows/wddm/wddm.h @@ -60,7 +60,7 @@ class Wddm { bool mapGpuVirtualAddress(AllocationStorageData *allocationStorageData); MOCKABLE_VIRTUAL D3DGPU_VIRTUAL_ADDRESS reserveGpuVirtualAddress(D3DGPU_VIRTUAL_ADDRESS minimumAddress, D3DGPU_VIRTUAL_ADDRESS maximumAddress, D3DGPU_SIZE_T size); MOCKABLE_VIRTUAL bool createContext(OsContextWin &osContext); - MOCKABLE_VIRTUAL void applyAdditionalContextFlags(CREATECONTEXT_PVTDATA &privateData, OsContextWin &osContext, const HardwareInfo &hwInfo); + MOCKABLE_VIRTUAL void applyAdditionalContextFlags(CREATECONTEXT_PVTDATA &privateData, OsContextWin &osContext); MOCKABLE_VIRTUAL bool freeGpuVirtualAddress(D3DGPU_VIRTUAL_ADDRESS &gpuPtr, uint64_t size); MOCKABLE_VIRTUAL NTSTATUS createAllocation(const void *alignedCpuPtr, const Gmm *gmm, D3DKMT_HANDLE &outHandle, D3DKMT_HANDLE &outResourceHandle, D3DKMT_HANDLE *outSharedHandle); MOCKABLE_VIRTUAL bool createAllocation64k(const Gmm *gmm, D3DKMT_HANDLE &outHandle); diff --git a/shared/source/os_interface/windows/wddm_additional_context_flags.cpp b/shared/source/os_interface/windows/wddm_additional_context_flags.cpp index 64a09543d9..d6ce0351cd 100644 --- a/shared/source/os_interface/windows/wddm_additional_context_flags.cpp +++ b/shared/source/os_interface/windows/wddm_additional_context_flags.cpp @@ -8,6 +8,6 @@ #include "shared/source/os_interface/windows/wddm/wddm.h" namespace NEO { -void Wddm::applyAdditionalContextFlags(CREATECONTEXT_PVTDATA &privateData, OsContextWin &osContext, const HardwareInfo &hwInfo) { +void Wddm::applyAdditionalContextFlags(CREATECONTEXT_PVTDATA &privateData, OsContextWin &osContext) { } } // namespace NEO