fix: Remove patchtokens fallback AIL

Related-To: NEO-12358
Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
This commit is contained in:
Jaroslaw Warchulski
2024-09-12 14:47:25 +00:00
committed by Compute-Runtime-Automation
parent f6a89bbc03
commit 05250e7460
6 changed files with 2 additions and 82 deletions

View File

@@ -702,27 +702,6 @@ HWTEST2_F(MinimumProgramFixture, givenEmptyAilWhenCreateProgramWithSourcesThenSo
pProgram->release();
}
HWTEST2_F(MinimumProgramFixture, givenEmptyAilWhenCreateProgramWithSourcesAndWithDummyKernelThenDoNotMarkApplicationContextAsNonZebin, IsAtLeastSkl) {
auto pDevice = pContext->getDevice(0);
auto rootDeviceEnvironment = pDevice->getExecutionEnvironment()->rootDeviceEnvironments[rootDeviceIndex].get();
rootDeviceEnvironment->ailConfiguration.reset(nullptr);
const char *dummyKernelSources[] = {"kernel void _(){}"}; // if detected - should trigger fallback to CTNI
size_t knownSourceSize = strlen(dummyKernelSources[0]);
auto pProgram = Program::create<MockProgram>(
pContext,
1,
dummyKernelSources,
&knownSourceSize,
retVal);
ASSERT_NE(nullptr, pProgram);
ASSERT_EQ(CL_SUCCESS, retVal);
EXPECT_FALSE(pProgram->getContext().checkIfContextIsNonZebin());
pProgram->release();
}
TEST_F(MinimumProgramFixture, givenApplicationContextMarkedAsNonZebinWhenBuildingProgramThenInternalOptionsShouldContainDisableZebinOption) {
const char *kernelSources[] = {"some source code"};
size_t knownSourceSize = strlen(kernelSources[0]);
@@ -749,38 +728,6 @@ TEST_F(MinimumProgramFixture, givenApplicationContextMarkedAsNonZebinWhenBuildin
pProgram->release();
}
HWTEST2_F(MinimumProgramFixture, givenAILReturningTrueForFallbackRequirementWhenBuildingProgramThenMarkContextAsNonZebin, IsAtLeastSkl) {
class MockAIL : public AILConfigurationHw<productFamily> {
public:
bool isFallbackToPatchtokensRequired(const std::string &kernelSources) override {
return true;
}
};
auto pDevice = pContext->getDevice(0);
auto rootDeviceEnvironment = pDevice->getExecutionEnvironment()->rootDeviceEnvironments[rootDeviceIndex].get();
rootDeviceEnvironment->ailConfiguration.reset(new MockAIL());
ASSERT_FALSE(pContext->checkIfContextIsNonZebin());
const char *kernelSources[] = {"some source code"};
size_t knownSourceSize = strlen(kernelSources[0]);
MockProgram *pProgram = nullptr;
pProgram = Program::create<SucceedingGenBinaryProgram>(
pContext,
1,
kernelSources,
&knownSourceSize,
retVal);
ASSERT_NE(nullptr, pProgram);
ASSERT_EQ(CL_SUCCESS, retVal);
retVal = pProgram->build(pProgram->getDevices(), "");
EXPECT_EQ(CL_SUCCESS, retVal);
EXPECT_TRUE(pContext->checkIfContextIsNonZebin());
pProgram->release();
}
TEST_F(ProgramFromSourceTest, GivenSpecificParamatersWhenBuildingProgramThenSuccessOrCorrectErrorCodeIsReturned) {
KernelBinaryHelper kbHelper(binaryFileName, true);
auto device = pPlatform->getClDevice(0);