mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
For TGL and ICL platforms - if on clCreateProgramWithSource() call we detect a nGen dummy kernel usage - enforce fallback to the patchtokens format (only for this kernel). - corrected naming - minor ULTs refactor (less dependencies). Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
35 lines
1.0 KiB
C++
35 lines
1.0 KiB
C++
/*
|
|
* 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
|