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

@@ -0,0 +1,35 @@
/*
* 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 AILBaseTests = ::testing::Test;
HWTEST2_F(AILBaseTests, whenKernelSourceIsANGenDummyKernelThenDoEnforcePatchtokensFormat, IsAtLeastSkl) {
std::string dummyKernelSource{"kernel void _(){}"};
bool enforceRebuildToCTNI = false;
AILConfigurationHw<productFamily> ail;
ail.forceFallbackToPatchtokensIfRequired(dummyKernelSource, enforceRebuildToCTNI);
EXPECT_TRUE(enforceRebuildToCTNI);
}
HWTEST2_F(AILBaseTests, whenKernelSourceIsNotANGenDummyKernelThenDoNotEnforcePatchtokensFormat, IsAtLeastSkl) {
std::string dummyKernelSource{"kernel void copybuffer(__global int* a, __global int* b){ //some code }"};
bool enforceRebuildToCTNI = false;
AILConfigurationHw<productFamily> ail;
ail.forceFallbackToPatchtokensIfRequired(dummyKernelSource, enforceRebuildToCTNI);
EXPECT_FALSE(enforceRebuildToCTNI);
}
} // namespace NEO