fix: Remove allow-zebin and enable-zebin compile options

Zebin is enabled by default.

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2024-06-10 12:20:59 +00:00
committed by Compute-Runtime-Automation
parent 9f6521f9b3
commit 5ae2709e6e
14 changed files with 46 additions and 117 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -1529,24 +1529,6 @@ TEST(TestCompilerInterface, givenInvalidIcbeVersionWhenAddOptionDisableZebinThen
EXPECT_FALSE(mockCompilerInterface->addOptionDisableZebin(option, internalOption));
}
TEST(TestCompilerInterface, givenOptionsWhenCallAddOptionDisableZebinThenProperValueIsReturned) {
DebugManagerStateRestore dbgRestore;
debugManager.flags.EnableDebugBreak.set(0);
debugManager.flags.PrintDebugMessages.set(0);
auto dummyValid = new MockCIFMain();
auto mockCompilerInterface = std::make_unique<MockCompilerInterface>();
mockCompilerInterface->igcMain.reset(dummyValid);
std::string options = NEO::CompilerOptions::enableZebin.str();
std::string internalOptions = "";
EXPECT_FALSE(mockCompilerInterface->addOptionDisableZebin(options, internalOptions));
options = "";
EXPECT_TRUE(mockCompilerInterface->addOptionDisableZebin(options, internalOptions));
}
TEST(TestCompilerInterface, givenOptionsWhenCallDisableZebinThenProperOptionsAreSet) {
DebugManagerStateRestore dbgRestore;
debugManager.flags.EnableDebugBreak.set(0);
@@ -1560,12 +1542,7 @@ TEST(TestCompilerInterface, givenOptionsWhenCallDisableZebinThenProperOptionsAre
std::string options = "";
std::string internalOptions = "";
EXPECT_TRUE(mockCompilerInterface->disableZebin(options, internalOptions));
EXPECT_FALSE(CompilerOptions::contains(options, NEO::CompilerOptions::enableZebin.str()));
options = NEO::CompilerOptions::enableZebin.str();
EXPECT_TRUE(mockCompilerInterface->disableZebin(options, internalOptions));
EXPECT_TRUE(CompilerOptions::contains(internalOptions, NEO::CompilerOptions::disableZebin.str()));
EXPECT_FALSE(CompilerOptions::contains(options, NEO::CompilerOptions::enableZebin.str()));
}
TEST(TranslationOutput, givenNonEmptyPointerAndSizeWhenMakingCopyThenCloneInputData) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2023 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -46,7 +46,7 @@ TEST(CompilerOptions, WhenConcatenateAppendIsCalledThenAddsSpaceAsSeparatorOnlyI
}
TEST(CompilerOptions, WhenTryingToExtractNonexistentOptionThenFalseIsReturnedAndStringIsNotModified) {
const std::string optionsInput{"-ze-allow-zebin -cl-intel-has-buffer-offset-arg"};
const std::string optionsInput{"-cl-intel-has-buffer-offset-arg"};
std::string options{optionsInput};
const bool wasExtracted{NEO::CompilerOptions::extract(NEO::CompilerOptions::noRecompiledFromIr, options)};
@@ -56,14 +56,14 @@ TEST(CompilerOptions, WhenTryingToExtractNonexistentOptionThenFalseIsReturnedAnd
}
TEST(CompilerOptions, WhenTryingToExtractOptionThatExistsThenTrueIsReturnedAndStringIsModified) {
const std::string optionsInput{"-ze-allow-zebin -Wno-recompiled-from-ir -cl-intel-has-buffer-offset-arg"};
const std::string optionsInput{"-Wno-recompiled-from-ir -cl-intel-has-buffer-offset-arg"};
std::string options{optionsInput};
const bool wasExtracted{NEO::CompilerOptions::extract(NEO::CompilerOptions::noRecompiledFromIr, options)};
EXPECT_TRUE(wasExtracted);
const std::string expectedOptions{"-ze-allow-zebin -cl-intel-has-buffer-offset-arg"};
const std::string expectedOptions{" -cl-intel-has-buffer-offset-arg"};
EXPECT_EQ(expectedOptions, options);
}