mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
refactor: move depth limitation from release helper to image_hw
Related-To: NEO-8390, HSD-16021488507 Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d8ac8641e5
commit
46c345789d
@@ -26,7 +26,6 @@ set(NEO_CORE_RELEASE_HELPER
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_2004.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_3000.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_3001.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_common_xe2_and_later.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_common_xe2_hpg.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_common_xe3_and_later.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/release_helper_common_xe3_lpg.inl
|
||||
|
||||
@@ -44,7 +44,6 @@ class ReleaseHelper {
|
||||
virtual bool isBFloat16ConversionSupported() const = 0;
|
||||
virtual bool isAuxSurfaceModeOverrideRequired() const = 0;
|
||||
virtual bool isResolvingSubDeviceIDNeeded() const = 0;
|
||||
virtual bool shouldAdjustDepth() const = 0;
|
||||
virtual bool isDirectSubmissionSupported() const = 0;
|
||||
virtual bool isRcsExposureDisabled() const = 0;
|
||||
virtual std::vector<uint32_t> getSupportedNumGrfs() const = 0;
|
||||
@@ -86,7 +85,6 @@ class ReleaseHelperHw : public ReleaseHelper {
|
||||
bool isBFloat16ConversionSupported() const override;
|
||||
bool isAuxSurfaceModeOverrideRequired() const override;
|
||||
bool isResolvingSubDeviceIDNeeded() const override;
|
||||
bool shouldAdjustDepth() const override;
|
||||
bool isDirectSubmissionSupported() const override;
|
||||
bool isRcsExposureDisabled() const override;
|
||||
std::vector<uint32_t> getSupportedNumGrfs() const override;
|
||||
|
||||
@@ -46,7 +46,6 @@ const SizeToPreferredSlmValueArray &ReleaseHelperHw<release>::getSizeToPreferred
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
#include "shared/source/release_helper/release_helper_common_xe2_and_later.inl"
|
||||
#include "shared/source/release_helper/release_helper_common_xe2_hpg.inl"
|
||||
|
||||
template class NEO::ReleaseHelperHw<NEO::release>;
|
||||
|
||||
@@ -48,7 +48,6 @@ const SizeToPreferredSlmValueArray &ReleaseHelperHw<release>::getSizeToPreferred
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
#include "shared/source/release_helper/release_helper_common_xe2_and_later.inl"
|
||||
#include "shared/source/release_helper/release_helper_common_xe2_hpg.inl"
|
||||
|
||||
template class NEO::ReleaseHelperHw<NEO::release>;
|
||||
|
||||
@@ -49,7 +49,6 @@ uint32_t ReleaseHelperHw<release>::getStackSizePerRay() const {
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
#include "shared/source/release_helper/release_helper_common_xe2_and_later.inl"
|
||||
#include "shared/source/release_helper/release_helper_common_xe3_and_later.inl"
|
||||
#include "shared/source/release_helper/release_helper_common_xe3_lpg.inl"
|
||||
template class NEO::ReleaseHelperHw<NEO::release>;
|
||||
|
||||
@@ -43,7 +43,6 @@ bool ReleaseHelperHw<release>::isDisablingMsaaRequired() const {
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
#include "shared/source/release_helper/release_helper_common_xe2_and_later.inl"
|
||||
#include "shared/source/release_helper/release_helper_common_xe3_and_later.inl"
|
||||
#include "shared/source/release_helper/release_helper_common_xe3_lpg.inl"
|
||||
template class NEO::ReleaseHelperHw<NEO::release>;
|
||||
|
||||
@@ -59,11 +59,6 @@ bool ReleaseHelperHw<releaseType>::isResolvingSubDeviceIDNeeded() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <ReleaseType releaseType>
|
||||
bool ReleaseHelperHw<releaseType>::shouldAdjustDepth() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <ReleaseType releaseType>
|
||||
bool ReleaseHelperHw<releaseType>::isDirectSubmissionSupported() const {
|
||||
return false;
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
bool ReleaseHelperHw<release>::shouldAdjustDepth() const {
|
||||
return true;
|
||||
}
|
||||
} // namespace NEO
|
||||
@@ -24,7 +24,6 @@ class MockReleaseHelper : public ReleaseHelper {
|
||||
ADDMETHOD_CONST_NOBASE(isBFloat16ConversionSupported, bool, false, ());
|
||||
ADDMETHOD_CONST_NOBASE(isAuxSurfaceModeOverrideRequired, bool, false, ());
|
||||
ADDMETHOD_CONST_NOBASE(isResolvingSubDeviceIDNeeded, bool, false, ());
|
||||
ADDMETHOD_CONST_NOBASE(shouldAdjustDepth, bool, false, ());
|
||||
ADDMETHOD_CONST_NOBASE(isDirectSubmissionSupported, bool, false, ());
|
||||
ADDMETHOD_CONST_NOBASE(isRcsExposureDisabled, bool, false, ());
|
||||
ADDMETHOD_CONST_NOBASE(getSupportedNumGrfs, std::vector<uint32_t>, {128}, ());
|
||||
|
||||
@@ -45,10 +45,6 @@ TEST_F(ReleaseHelper1255Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1255Tests, whenShouldAdjustCalledThenFalseReturned) {
|
||||
whenShouldAdjustCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1255Tests, whenGettingSupportedNumGrfsThenCorrectValuesAreReturned) {
|
||||
whenGettingSupportedNumGrfsThenValues128And256Returned();
|
||||
}
|
||||
|
||||
@@ -45,10 +45,6 @@ TEST_F(ReleaseHelper1256Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1256Tests, whenShouldAdjustCalledThenFalseReturned) {
|
||||
whenShouldAdjustCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1256Tests, whenGettingSupportedNumGrfsThenCorrectValuesAreReturned) {
|
||||
whenGettingSupportedNumGrfsThenValues128And256Returned();
|
||||
}
|
||||
|
||||
@@ -45,10 +45,6 @@ TEST_F(ReleaseHelper1257Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1257Tests, whenShouldAdjustCalledThenFalseReturned) {
|
||||
whenShouldAdjustCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1257Tests, whenGettingSupportedNumGrfsThenCorrectValuesAreReturned) {
|
||||
whenGettingSupportedNumGrfsThenValues128And256Returned();
|
||||
}
|
||||
|
||||
@@ -44,10 +44,6 @@ TEST_F(ReleaseHelper1274Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1274Tests, whenShouldAdjustCalledThenFalseReturned) {
|
||||
whenShouldAdjustCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1274Tests, whenGettingSupportedNumGrfsThenCorrectValuesAreReturned) {
|
||||
whenGettingSupportedNumGrfsThenValues128And256Returned();
|
||||
}
|
||||
|
||||
@@ -45,10 +45,6 @@ TEST_F(ReleaseHelper2001Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper2001Tests, whenShouldAdjustCalledThenTrueReturned) {
|
||||
whenShouldAdjustCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper2001Tests, whenGettingSupportedNumGrfsThenCorrectValuesAreReturned) {
|
||||
whenGettingSupportedNumGrfsThenValues128And256Returned();
|
||||
}
|
||||
|
||||
@@ -45,9 +45,6 @@ TEST_F(ReleaseHelper2004Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
|
||||
EXPECT_TRUE(releaseHelper->isNumRtStacksPerDssFixedValue());
|
||||
}
|
||||
}
|
||||
TEST_F(ReleaseHelper2004Tests, whenShouldAdjustCalledThenTrueReturned) {
|
||||
whenShouldAdjustCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper2004Tests, whenGettingSupportedNumGrfsThenCorrectValuesAreReturned) {
|
||||
whenGettingSupportedNumGrfsThenValues128And256Returned();
|
||||
|
||||
@@ -43,10 +43,6 @@ TEST_F(ReleaseHelper3000Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper3000Tests, whenShouldAdjustCalledThenTrueReturned) {
|
||||
whenShouldAdjustCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper3000Tests, whenGettingSupportedNumGrfsThenCorrectValuesAreReturned) {
|
||||
whenGettingSupportedNumGrfsThenValuesUpTo256Returned();
|
||||
}
|
||||
|
||||
@@ -43,10 +43,6 @@ TEST_F(ReleaseHelper3001Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper3001Tests, whenShouldAdjustCalledThenTrueReturned) {
|
||||
whenShouldAdjustCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper3001Tests, whenGettingSupportedNumGrfsThenCorrectValuesAreReturned) {
|
||||
whenGettingSupportedNumGrfsThenValuesUpTo256Returned();
|
||||
}
|
||||
|
||||
@@ -19,25 +19,6 @@ using namespace NEO;
|
||||
ReleaseHelperTestsBase::ReleaseHelperTestsBase() = default;
|
||||
ReleaseHelperTestsBase ::~ReleaseHelperTestsBase() = default;
|
||||
|
||||
void ReleaseHelperTestsBase::whenShouldAdjustCalledThenTrueReturned() {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
releaseHelper = ReleaseHelper::create(ipVersion);
|
||||
ASSERT_NE(nullptr, releaseHelper);
|
||||
|
||||
EXPECT_TRUE(releaseHelper->shouldAdjustDepth());
|
||||
}
|
||||
}
|
||||
|
||||
void ReleaseHelperTestsBase::whenShouldAdjustCalledThenFalseReturned() {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
releaseHelper = ReleaseHelper::create(ipVersion);
|
||||
ASSERT_NE(nullptr, releaseHelper);
|
||||
EXPECT_FALSE(releaseHelper->shouldAdjustDepth());
|
||||
}
|
||||
}
|
||||
|
||||
void ReleaseHelperTestsBase::whenGettingSupportedNumGrfsThenValues128And256Returned() {
|
||||
std::vector<uint32_t> expectedValues{128u, 256u};
|
||||
for (auto &revision : getRevisions()) {
|
||||
|
||||
@@ -21,8 +21,6 @@ struct ReleaseHelperTestsBase : public ::testing::Test {
|
||||
|
||||
ReleaseHelperTestsBase();
|
||||
~ReleaseHelperTestsBase() override;
|
||||
void whenShouldAdjustCalledThenTrueReturned();
|
||||
void whenShouldAdjustCalledThenFalseReturned();
|
||||
void whenGettingSupportedNumGrfsThenValues128And256Returned();
|
||||
void whenGettingThreadsPerEuConfigsThen4And8AreReturned();
|
||||
void whenGettingTotalMemBankSizeThenReturn32GB();
|
||||
|
||||
Reference in New Issue
Block a user