mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 17:41:26 +08:00
refactor: add patchtokens fallback AIL
Related-To: HSD-14023878700 Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
26346af8ed
commit
051cada78b
@@ -72,6 +72,10 @@ class MockAILConfiguration : public AILConfiguration {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool isFallbackToPatchtokensRequired() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected:
|
||||
void applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) override {}
|
||||
};
|
||||
|
||||
@@ -112,22 +112,28 @@ HWTEST2_F(AILTests, whenModifyKernelIfRequiredIsCalledThenDontChangeKernelSource
|
||||
EXPECT_STREQ(copyKernel.c_str(), kernelSources.c_str());
|
||||
}
|
||||
|
||||
HWTEST2_F(AILTests, GivenAilWhenCheckingContextSyncFlagRequiredThenExpectFalse, MatchAny) {
|
||||
HWTEST2_F(AILTests, givenAilWhenCheckingContextSyncFlagRequiredThenExpectFalse, MatchAny) {
|
||||
AILWhitebox<productFamily> ail;
|
||||
ail.processName = "other";
|
||||
EXPECT_FALSE(ail.isContextSyncFlagRequired());
|
||||
}
|
||||
|
||||
HWTEST2_F(AILTests, GivenAilWhenCheckingOverfetchDisableRequiredThenExpectFalse, MatchAny) {
|
||||
HWTEST2_F(AILTests, givenAilWhenCheckingOverfetchDisableRequiredThenExpectFalse, MatchAny) {
|
||||
AILWhitebox<productFamily> ail;
|
||||
ail.processName = "other";
|
||||
EXPECT_FALSE(ail.is256BPrefetchDisableRequired());
|
||||
}
|
||||
|
||||
HWTEST2_F(AILTests, GivenAilWhenCheckingDrainHostptrsRequiredThenExpectTrue, MatchAny) {
|
||||
HWTEST2_F(AILTests, givenAilWhenCheckingDrainHostptrsRequiredThenExpectTrue, MatchAny) {
|
||||
AILWhitebox<productFamily> ail;
|
||||
ail.processName = "other";
|
||||
EXPECT_TRUE(ail.drainHostptrs());
|
||||
}
|
||||
|
||||
HWTEST2_F(AILTests, givenAilWhenCheckingIfPatchtokenFallbackIsRequiredThenExpectFalse, MatchAny) {
|
||||
AILWhitebox<productFamily> ail;
|
||||
ail.processName = "other";
|
||||
EXPECT_FALSE(ail.isFallbackToPatchtokensRequired());
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023-2024 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, MatchAny) {
|
||||
std::string dummyKernelSource{"kernel void _(){}"};
|
||||
AILConfigurationHw<productFamily> ail;
|
||||
EXPECT_TRUE(ail.isFallbackToPatchtokensRequired(dummyKernelSource));
|
||||
}
|
||||
|
||||
HWTEST2_F(AILBaseTests, whenKernelSourceIsNotANGenDummyKernelThenDoNotEnforcePatchtokensFormat, MatchAny) {
|
||||
std::string dummyKernelSource{"kernel void copybuffer(__global int* a, __global int* b){ //some code }"};
|
||||
AILConfigurationHw<productFamily> ail;
|
||||
EXPECT_FALSE(ail.isFallbackToPatchtokensRequired(dummyKernelSource));
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user