Revert "fix: allow legacy device binary validation logic for Blender on DG2 p...

This reverts commit d3d15542fb.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2023-10-24 20:25:42 +02:00
committed by Compute-Runtime-Automation
parent dfae4f0fc9
commit 69f614a8c2
10 changed files with 1 additions and 108 deletions

View File

@@ -10,10 +10,6 @@ set(OCLOC_NAME "ocloc")
set(OCLOC_FOLDER_NAME "offline_compiler")
set(CLOC_LIB_SRCS_LIB
${NEO_SHARED_DIRECTORY}/ail/ail_configuration.h
${NEO_SHARED_DIRECTORY}/ail/ail_configuration.cpp
${NEO_SHARED_DIRECTORY}/ail${BRANCH_DIR_SUFFIX}ail_configuration_extra.cpp
${NEO_SHARED_DIRECTORY}/ail//ail_configuration_base.inl
${NEO_SHARED_DIRECTORY}/compiler_interface/compiler_options.cpp
${NEO_SHARED_DIRECTORY}/compiler_interface/compiler_options.h
${NEO_SHARED_DIRECTORY}/compiler_interface/compiler_cache.cpp
@@ -138,7 +134,6 @@ endif()
if(WIN32)
list(APPEND CLOC_LIB_SRCS_LIB
${NEO_SHARED_DIRECTORY}/ail/windows/ail_configuration_windows.cpp
${NEO_SHARED_DIRECTORY}/compiler_interface/windows/compiler_cache_windows.cpp
${NEO_SHARED_DIRECTORY}/compiler_interface/windows/os_compiler_cache_helper.cpp
${NEO_SHARED_DIRECTORY}/dll/windows/options_windows.cpp
@@ -150,7 +145,6 @@ if(WIN32)
)
else()
list(APPEND CLOC_LIB_SRCS_LIB
${NEO_SHARED_DIRECTORY}/ail/linux/ail_configuration_linux.cpp
${NEO_SHARED_DIRECTORY}/compiler_interface/linux/compiler_cache_linux.cpp
${NEO_SHARED_DIRECTORY}/compiler_interface/linux/os_compiler_cache_helper.cpp
${NEO_SHARED_DIRECTORY}/dll/linux/options_linux.cpp
@@ -183,7 +177,6 @@ macro(macro_for_each_platform)
${NEO_SOURCE_DIR}/shared/source${BRANCH}${CORE_TYPE_LOWER}${BRANCH_DIR}hw_info_${PLATFORM_IT_LOWER}.cpp
${NEO_SOURCE_DIR}/shared/source${BRANCH}${CORE_TYPE_LOWER}${BRANCH_DIR}compiler_product_helper_${PLATFORM_IT_LOWER}.inl
${NEO_SOURCE_DIR}/shared/source${BRANCH}${CORE_TYPE_LOWER}${BRANCH_DIR}enable_compiler_product_helper_${PLATFORM_IT_LOWER}.cpp
${NEO_SOURCE_DIR}/shared/source/ail${BRANCH_DIR}${CORE_TYPE_LOWER}${BRANCH}${PLATFORM_IT_LOWER}/ail_configuration_${PLATFORM_IT_LOWER}.cpp
)
if(EXISTS ${SRC_FILE})
list(APPEND CLOC_LIB_SRCS_LIB ${SRC_FILE})

View File

@@ -59,8 +59,6 @@ class AILConfiguration {
virtual bool isContextSyncFlagRequired() = 0;
virtual bool useLegacyValidationLogic() = 0;
protected:
virtual void applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) = 0;
std::string processName;
@@ -86,7 +84,6 @@ class AILConfigurationHw : public AILConfiguration {
void modifyKernelIfRequired(std::string &kernel) override;
bool isFallbackToPatchtokensRequired(const std::string &kernelSources) override;
bool isContextSyncFlagRequired() override;
bool useLegacyValidationLogic() override;
};
template <PRODUCT_FAMILY product>

View File

@@ -45,9 +45,4 @@ inline bool AILConfigurationHw<Product>::isContextSyncFlagRequired() {
return false;
}
template <PRODUCT_FAMILY Product>
inline bool AILConfigurationHw<Product>::useLegacyValidationLogic() {
return false;
}
} // namespace NEO

View File

@@ -30,9 +30,6 @@ const std::vector<ApplicationKernelFixDg2> applicationsKernelFixesDG2 =
{{"FAHBench-gui", "findBlocksWithInteractions", 0xa39732fc26656899, 12651u, "else { SYNC_WARPS; }"},
{"FAHBench-cmd", "findBlocksWithInteractions", 0xa39732fc26656899, 12651u, "else { SYNC_WARPS; }"}};
constexpr std::array<std::string_view, 1> applicationsLegacyValidationPathDG2 = {
"blender"};
template <>
void AILConfigurationHw<IGFX_DG2>::modifyKernelIfRequired(std::string &kernelsSources) {
@@ -48,14 +45,6 @@ void AILConfigurationHw<IGFX_DG2>::modifyKernelIfRequired(std::string &kernelsSo
}
}
template <>
bool AILConfigurationHw<IGFX_DG2>::useLegacyValidationLogic() {
auto it = std::find_if(applicationsLegacyValidationPathDG2.begin(), applicationsLegacyValidationPathDG2.end(), [this](const auto &appName) {
return this->processName == appName;
});
return it != applicationsLegacyValidationPathDG2.end() ? true : false;
}
template class AILConfigurationHw<IGFX_DG2>;
} // namespace NEO

View File

@@ -576,4 +576,3 @@ DECLARE_DEBUG_VARIABLE(bool, BinaryCacheTrace, false, "enable cl_cache to produc
/* WORKAROUND FLAGS */
DECLARE_DEBUG_VARIABLE(int32_t, ForceDummyBlitWa, -1, "-1: default, 0: disabled, 1: enabled, Forces a workaround with dummy blits, driver adds an extra blit before command MI_ARB_CHECK on bcs")
DECLARE_DEBUG_VARIABLE(bool, VfBarResourceAllocationWa, true, "Enables/disables WA for resizing VF BAR to 2GB on Warm Reset.")
DECLARE_DEBUG_VARIABLE(bool, DoNotUseProductConfigForValidationWa, false, "Forces a workaround with legacy device binary validation usage (skip checking PRODUCT_CONFIG even if passed");

View File

@@ -7,7 +7,6 @@
#include "shared/source/device_binary_format/zebin/zebin_decoder.h"
#include "shared/source/ail/ail_configuration.h"
#include "shared/source/compiler_interface/intermediate_representations.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/device_binary_format/device_binary_formats.h"
@@ -49,13 +48,7 @@ bool validateTargetDevice(const TargetDevice &targetDevice, Elf::ELF_IDENTIFIER_
return false;
}
bool useLegacyValidationPath = false;
auto ailConfiguration = AILConfiguration::get(targetDevice.productFamily);
if (ailConfiguration) {
useLegacyValidationPath = ailConfiguration->useLegacyValidationLogic();
}
if (false == NEO::DebugManager.flags.DoNotUseProductConfigForValidationWa.get() && false == useLegacyValidationPath && productConfig != AOT::UNKNOWN_ISA) {
if (productConfig != AOT::UNKNOWN_ISA) {
return targetDevice.aotConfig.value == productConfig;
}

View File

@@ -28,11 +28,6 @@ class MockAILConfiguration : public AILConfiguration {
return contextSyncFlagReturn;
}
bool fallbackToLegacyValidationLogic = false;
bool useLegacyValidationLogic() override {
return fallbackToLegacyValidationLogic;
}
protected:
void applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) override {}
};

View File

@@ -556,5 +556,4 @@ OverridePatIndexForDeviceMemory = -1
PrintGmmCompressionParams = 0
SkipInOrderNonWalkerSignalingAllowed = 0
PrintKernelDispatchParameters = 0
DoNotUseProductConfigForValidationWa = 0
# Please don't edit below this line

View File

@@ -5,7 +5,6 @@
*
*/
#include "shared/source/ail/ail_configuration.h"
#include "shared/source/compiler_interface/external_functions.h"
#include "shared/source/compiler_interface/linker.h"
#include "shared/source/device_binary_format/device_binary_formats.h"
@@ -20,8 +19,6 @@
#include "shared/source/program/kernel_info.h"
#include "shared/source/program/program_info.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "shared/test/common/helpers/variable_backup.h"
#include "shared/test/common/mocks/mock_ail_configuration.h"
#include "shared/test/common/mocks/mock_elf.h"
#include "shared/test/common/mocks/mock_execution_environment.h"
#include "shared/test/common/mocks/mock_modules_zebin.h"
@@ -5987,50 +5984,6 @@ TEST(ValidateTargetDeviceTests, givenSteppingBiggerThanMaxHwRevisionWhenValidati
EXPECT_FALSE(res);
}
TEST(ValidateTargetDeviceTests, givenAILEnabledAndUseLegacyValidationLogicReturningTrueWhenValidatingTargetDeviceThenDoNotUseProductConfigForValidationWa) {
VariableBackup<AILConfiguration *> ailConfiguration(&ailConfigurationTable[productFamily]);
MockAILConfiguration mockAilConfig;
mockAilConfig.fallbackToLegacyValidationLogic = true;
ASSERT_TRUE(mockAilConfig.useLegacyValidationLogic());
ailConfigurationTable[productFamily] = &mockAilConfig;
NEO::HardwareIpVersion aotConfig = {0};
aotConfig.value = 0x00001234;
TargetDevice targetDevice;
targetDevice.maxPointerSizeInBytes = 8u;
targetDevice.productFamily = productFamily;
targetDevice.coreFamily = renderCoreFamily;
targetDevice.aotConfig.value = aotConfig.value + 0x10; // assert mismatch on aotConfig values, rest of values should result in validation success
Zebin::Elf::ZebinTargetFlags targetMetadata;
targetMetadata.validateRevisionId = false; // in this test case, AOT config should be skipped and productFamily and coreFamily used only
auto res = validateTargetDevice(targetDevice, Zebin::Elf::EI_CLASS_64, productFamily, renderCoreFamily, static_cast<AOT::PRODUCT_CONFIG>(aotConfig.value), targetMetadata);
EXPECT_TRUE(res);
}
TEST(ValidateTargetDeviceTests, givenDoNotUseProductConfigForValidationWaFlagSetWhenValidatingTargetDeviceThenDoNotUseProductConfigForValidation) {
DebugManagerStateRestore dbgRestorer;
DebugManager.flags.DoNotUseProductConfigForValidationWa.set(true);
NEO::HardwareIpVersion aotConfig = {0};
aotConfig.value = 0x00001234;
TargetDevice targetDevice;
targetDevice.maxPointerSizeInBytes = 8u;
targetDevice.productFamily = productFamily;
targetDevice.coreFamily = renderCoreFamily;
targetDevice.aotConfig.value = aotConfig.value + 0x10; // assert mismatch on aotConfig values, rest of values should result in validation success
Zebin::Elf::ZebinTargetFlags targetMetadata;
targetMetadata.validateRevisionId = false; // in this test case, AOT config should be skipped and productFamily and coreFamily used only
auto res = validateTargetDevice(targetDevice, Zebin::Elf::EI_CLASS_64, productFamily, renderCoreFamily, static_cast<AOT::PRODUCT_CONFIG>(aotConfig.value), targetMetadata);
EXPECT_TRUE(res);
}
TEST(PopulateGlobalDeviceHostNameMapping, givenValidZebinWithGlobalHostAccessTableSectionThenPopulateHostDeviceNameMapCorrectly) {
NEO::MockExecutionEnvironment mockExecutionEnvironment{};
auto &gfxCoreHelper = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHelper<NEO::GfxCoreHelper>();

View File

@@ -8,7 +8,6 @@
#include "shared/source/ail/ail_configuration.h"
#include "shared/test/common/helpers/default_hw_info.h"
#include "shared/test/common/helpers/variable_backup.h"
#include "shared/test/common/mocks/mock_ail_configuration.h"
#include "shared/test/common/test_macros/hw_test.h"
namespace NEO {
@@ -109,23 +108,4 @@ HWTEST2_F(AILTestsDg2, givenFixesForApplicationsWhenModifyKernelIfRequiredIsCall
EXPECT_STREQ(copyKernelSources.c_str(), kernelSources.c_str());
}
}
HWTEST2_F(AILTestsDg2, givenApplicationNameRequiringCrossTargetCompabilityWhenCallingUseValidationLogicThenReturnProperValue, IsDG2) {
VariableBackup<AILConfiguration *> ailConfigurationBackup(&ailConfigurationTable[productFamily]);
AILMock<productFamily> ail;
ailConfigurationTable[productFamily] = &ail;
auto ailConfiguration = AILConfiguration::get(defaultHwInfo->platform.eProductFamily);
ASSERT_NE(nullptr, ailConfiguration);
ail.processName = "unknown";
EXPECT_FALSE(ail.useLegacyValidationLogic());
std::array<std::string_view, 1> applicationNamesRequiringLegacyValidation = {
"blender"};
for (auto appName : applicationNamesRequiringLegacyValidation) {
ail.processName = appName;
EXPECT_TRUE(ail.useLegacyValidationLogic());
}
}
} // namespace NEO