mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
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:
committed by
Compute-Runtime-Automation
parent
b224ec947e
commit
5fe902c819
@@ -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()
|
||||
35
shared/test/unit_test/ail/ail_tests_base.cpp
Normal file
35
shared/test/unit_test/ail/ail_tests_base.cpp
Normal 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
|
||||
Reference in New Issue
Block a user