feat(AIL): make AIL oneDNN WA platform-independent

If on clCreateProgramWithSource() call we detect a nGen dummy kernel usage,
then enforce fallback to the patchtokens format (only for this kernel).
Extend this logic to all platforms (previously - only for TGL/ICL).
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit is contained in:
Kacper Nowak
2023-02-10 15:05:50 +00:00
committed by Compute-Runtime-Automation
parent b224ec947e
commit 5fe902c819
10 changed files with 17 additions and 71 deletions

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2021-2022 Intel Corporation
# Copyright (C) 2021-2023 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@@ -7,6 +7,7 @@
target_sources(neo_shared_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/ail_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ail_tests_base.cpp
)
add_subdirectories()

View File

@@ -10,23 +10,23 @@
namespace NEO {
using AILTestsIcllp = ::testing::Test;
using AILBaseTests = ::testing::Test;
HWTEST2_F(AILTestsIcllp, whenKernelSourceIsANGenDummyKernelThenDoEnforcePatchtokensFormat, IsICLLP) {
HWTEST2_F(AILBaseTests, whenKernelSourceIsANGenDummyKernelThenDoEnforcePatchtokensFormat, IsAtLeastSkl) {
std::string dummyKernelSource{"kernel void _(){}"};
bool enforceRebuildToCTNI = false;
AILConfigurationHw<IGFX_ICELAKE_LP> ail;
AILConfigurationHw<productFamily> ail;
ail.forceFallbackToPatchtokensIfRequired(dummyKernelSource, enforceRebuildToCTNI);
EXPECT_TRUE(enforceRebuildToCTNI);
}
HWTEST2_F(AILTestsIcllp, whenKernelSourceIsNotANGenDummyKernelThenDoNotEnforcePatchtokensFormat, IsICLLP) {
HWTEST2_F(AILBaseTests, whenKernelSourceIsNotANGenDummyKernelThenDoNotEnforcePatchtokensFormat, IsAtLeastSkl) {
std::string dummyKernelSource{"kernel void copybuffer(__global int* a, __global int* b){ //some code }"};
bool enforceRebuildToCTNI = false;
AILConfigurationHw<IGFX_ICELAKE_LP> ail;
AILConfigurationHw<productFamily> ail;
ail.forceFallbackToPatchtokensIfRequired(dummyKernelSource, enforceRebuildToCTNI);
EXPECT_FALSE(enforceRebuildToCTNI);

View File

@@ -14,7 +14,6 @@ if(TESTS_ICLLP)
${NEO_SHARED_tests_gen11_icllp}
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_icllp.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_program_media_sampler_icllp.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ail_tests_icllp.cpp
)
add_subdirectories()

View File

@@ -11,7 +11,6 @@ if(TESTS_TGLLP)
${NEO_SHARED_tests_genlp12_tgllp}
${CMAKE_CURRENT_SOURCE_DIR}/test_gfx_core_helper_tgllp.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_tests_tgllp.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ail_tests_tgllp.cpp
)
add_subdirectories()

View File

@@ -1,35 +0,0 @@
/*
* Copyright (C) 2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/ail/ail_configuration.h"
#include "shared/test/common/test_macros/hw_test.h"
namespace NEO {
using AILTestsTgllp = ::testing::Test;
HWTEST2_F(AILTestsTgllp, whenKernelSourceIsANGenDummyKernelThenDoEnforcePatchtokensFormat, IsTGLLP) {
std::string dummyKernelSource{"kernel void _(){}"};
bool enforceRebuildToCTNI = false;
AILConfigurationHw<IGFX_TIGERLAKE_LP> ail;
ail.forceFallbackToPatchtokensIfRequired(dummyKernelSource, enforceRebuildToCTNI);
EXPECT_TRUE(enforceRebuildToCTNI);
}
HWTEST2_F(AILTestsTgllp, whenKernelSourceIsNotANGenDummyKernelThenDoNotEnforcePatchtokensFormat, IsTGLLP) {
std::string dummyKernelSource{"kernel void copybuffer(__global int* a, __global int* b){ //some code }"};
bool enforceRebuildToCTNI = false;
AILConfigurationHw<IGFX_TIGERLAKE_LP> ail;
ail.forceFallbackToPatchtokensIfRequired(dummyKernelSource, enforceRebuildToCTNI);
EXPECT_FALSE(enforceRebuildToCTNI);
}
} // namespace NEO