From 3f6443edfbebe6d31084666eb2fca04e5263bbb7 Mon Sep 17 00:00:00 2001 From: Young Jin Yoon Date: Fri, 24 Mar 2023 05:37:12 +0000 Subject: [PATCH] Change allowZebin to enableZebin for apiOptions Changed -cl-intel-allow-zebin to -cl-intel-enable-zebin only for API options. Related-To: NEO-7801 Signed-off-by: Young Jin Yoon --- level_zero/core/source/module/module_imp.cpp | 8 ++-- .../unit_tests/sources/module/test_module.cpp | 31 ++++++++++----- opencl/source/program/program.cpp | 6 +-- .../test/unit_test/program/program_tests.cpp | 38 +++++++++---------- .../program_with_kernel_debug_tests.cpp | 2 +- .../compiler_interface/compiler_options.h | 1 + shared/source/program/program_info.cpp | 4 +- .../unit_test/program/program_info_tests.cpp | 20 +++++----- 8 files changed, 62 insertions(+), 48 deletions(-) diff --git a/level_zero/core/source/module/module_imp.cpp b/level_zero/core/source/module/module_imp.cpp index fda1788fec..0593cb87f4 100644 --- a/level_zero/core/source/module/module_imp.cpp +++ b/level_zero/core/source/module/module_imp.cpp @@ -265,9 +265,9 @@ ze_result_t ModuleTranslationUnit::buildFromSpirV(const char *input, uint32_t in std::string internalOptions = this->generateCompilerOptions(buildOptions, internalBuildOptions); auto isZebinAllowed = l0GfxCoreHelper.isZebinAllowed(this->device->getNEODevice()->getDebugger()); if (isZebinAllowed == false) { - auto pos = this->options.find(NEO::CompilerOptions::allowZebin.str()); + auto pos = this->options.find(NEO::CompilerOptions::enableZebin.str()); if (pos != std::string::npos) { - updateBuildLog("Cannot build zebinary for this device with debugger enabled. Remove \"-ze-intel-allow-zebin\" build flag."); + updateBuildLog("Cannot build zebinary for this device with debugger enabled. Remove \"-ze-intel-enable-zebin\" build flag."); return ZE_RESULT_ERROR_MODULE_BUILD_FAILURE; } internalOptions += " " + NEO::CompilerOptions::disableZebin.str(); @@ -303,7 +303,7 @@ ze_result_t ModuleTranslationUnit::createFromNativeBinary(const char *input, siz this->irBinarySize = singleDeviceBinary.intermediateRepresentation.size(); this->options = singleDeviceBinary.buildOptions.str(); if (singleDeviceBinary.format == NEO::DeviceBinaryFormat::Zebin) { - this->options += " " + NEO::CompilerOptions::allowZebin.str(); + this->options += " " + NEO::CompilerOptions::enableZebin.str(); } if (false == singleDeviceBinary.debugData.empty()) { @@ -739,7 +739,7 @@ void ModuleImp::createBuildOptions(const char *pBuildFlags, std::string &apiOpti moveBuildOption(apiOptions, apiOptions, NEO::CompilerOptions::optDisable, BuildOptions::optDisable); moveBuildOption(internalBuildOptions, apiOptions, NEO::CompilerOptions::greaterThan4gbBuffersRequired, BuildOptions::greaterThan4GbRequired); - moveBuildOption(internalBuildOptions, apiOptions, NEO::CompilerOptions::allowZebin, NEO::CompilerOptions::allowZebin); + moveBuildOption(internalBuildOptions, apiOptions, NEO::CompilerOptions::allowZebin, NEO::CompilerOptions::enableZebin); moveBuildOption(internalBuildOptions, apiOptions, NEO::CompilerOptions::largeGrf, BuildOptions::optLargeRegisterFile); moveBuildOption(internalBuildOptions, apiOptions, NEO::CompilerOptions::autoGrf, BuildOptions::optAutoGrf); diff --git a/level_zero/core/test/unit_tests/sources/module/test_module.cpp b/level_zero/core/test/unit_tests/sources/module/test_module.cpp index 4887f95061..fc992d1408 100644 --- a/level_zero/core/test/unit_tests/sources/module/test_module.cpp +++ b/level_zero/core/test/unit_tests/sources/module/test_module.cpp @@ -2335,7 +2335,7 @@ HWTEST_F(ModuleTranslationUnitTest, WhenCreatingFromZebinThenAppendAllowZebinFla result = moduleTu.createFromNativeBinary(reinterpret_cast(zebin.storage.data()), zebin.storage.size()); EXPECT_EQ(result, ZE_RESULT_SUCCESS); - auto expectedOptions = " " + NEO::CompilerOptions::allowZebin.str(); + auto expectedOptions = " " + NEO::CompilerOptions::enableZebin.str(); EXPECT_STREQ(expectedOptions.c_str(), moduleTu.options.c_str()); } @@ -2688,7 +2688,7 @@ HWTEST_F(ModuleTranslationUnitTest, givenForceToStatelessRequiredWhenBuildingMod } } -HWTEST2_F(ModuleTranslationUnitTest, givenSourceLevelDebuggerAndAllowZebinBuildOptionWhenBuildWithSpirvThenModuleBuildFails, IsAtMostGen12lp) { +HWTEST2_F(ModuleTranslationUnitTest, givenSourceLevelDebuggerAndEnableZebinBuildOptionWhenBuildWithSpirvThenModuleBuildFails, IsAtMostGen12lp) { if (device->getHwInfo().capabilityTable.debuggerSupported == false) { GTEST_SKIP(); @@ -2701,13 +2701,13 @@ HWTEST2_F(ModuleTranslationUnitTest, givenSourceLevelDebuggerAndAllowZebinBuildO MockModuleTranslationUnit moduleTu(device); ze_result_t result = ZE_RESULT_SUCCESS; - auto buildOption = NEO::CompilerOptions::allowZebin.str(); + auto buildOption = NEO::CompilerOptions::enableZebin.str(); result = moduleTu.buildFromSpirV("", 0U, buildOption.c_str(), "", nullptr); EXPECT_EQ(result, ZE_RESULT_ERROR_MODULE_BUILD_FAILURE); } -HWTEST2_F(ModuleTranslationUnitTest, givenSourceLevelDebuggerAndAllowZebinBuildOptionWhenBuildWithSpirvThenModuleBuildsWithSuccess, IsAtLeastXeHpCore) { +HWTEST2_F(ModuleTranslationUnitTest, givenSourceLevelDebuggerAndEnableZebinBuildOptionWhenBuildWithSpirvThenModuleBuildsWithSuccess, IsAtLeastXeHpCore) { if (device->getHwInfo().capabilityTable.debuggerSupported == false) { GTEST_SKIP(); @@ -2721,16 +2721,16 @@ HWTEST2_F(ModuleTranslationUnitTest, givenSourceLevelDebuggerAndAllowZebinBuildO MockModuleTranslationUnit moduleTu(device); moduleTu.processUnpackedBinaryCallBase = false; ze_result_t result = ZE_RESULT_SUCCESS; - auto buildOption = NEO::CompilerOptions::allowZebin.str(); + auto buildOption = NEO::CompilerOptions::enableZebin.str(); result = moduleTu.buildFromSpirV("", 0U, buildOption.c_str(), "", nullptr); EXPECT_EQ(result, ZE_RESULT_SUCCESS); EXPECT_EQ(moduleTu.processUnpackedBinaryCalled, 1u); - EXPECT_NE(mockCompilerInterface->receivedApiOptions.find(NEO::CompilerOptions::allowZebin.str()), std::string::npos); + EXPECT_NE(mockCompilerInterface->receivedApiOptions.find(NEO::CompilerOptions::enableZebin.str()), std::string::npos); EXPECT_EQ(mockCompilerInterface->inputInternalOptions.find(NEO::CompilerOptions::disableZebin.str()), std::string::npos); } -HWTEST_F(ModuleTranslationUnitTest, givenAllowZebinBuildOptionWhenBuildWithSpirvThenOptionsContainsAllowZebin) { +HWTEST_F(ModuleTranslationUnitTest, givenEnableZebinBuildOptionWhenBuildWithSpirvThenOptionsContainsAllowZebin) { auto mockCompilerInterface = new MockCompilerInterface; auto &rootDeviceEnvironment = neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]; rootDeviceEnvironment->compilerInterface.reset(mockCompilerInterface); @@ -2738,12 +2738,12 @@ HWTEST_F(ModuleTranslationUnitTest, givenAllowZebinBuildOptionWhenBuildWithSpirv MockModuleTranslationUnit moduleTu(device); moduleTu.processUnpackedBinaryCallBase = false; ze_result_t result = ZE_RESULT_ERROR_MODULE_BUILD_FAILURE; - auto buildOption = NEO::CompilerOptions::allowZebin.str(); + auto buildOption = NEO::CompilerOptions::enableZebin.str(); result = moduleTu.buildFromSpirV("", 0U, buildOption.c_str(), "", nullptr); EXPECT_EQ(result, ZE_RESULT_SUCCESS); EXPECT_EQ(moduleTu.processUnpackedBinaryCalled, 1u); - EXPECT_NE(mockCompilerInterface->receivedApiOptions.find(NEO::CompilerOptions::allowZebin.str()), std::string::npos); + EXPECT_NE(mockCompilerInterface->receivedApiOptions.find(NEO::CompilerOptions::enableZebin.str()), std::string::npos); EXPECT_EQ(mockCompilerInterface->inputInternalOptions.find(NEO::CompilerOptions::disableZebin.str()), std::string::npos); } @@ -2923,6 +2923,19 @@ TEST_F(ModuleTest, givenInternalOptionsWhenBindlessDisabledThenBindlesOptionsNot EXPECT_FALSE(NEO::CompilerOptions::contains(internalBuildOptions, NEO::CompilerOptions::bindlessMode)); } +TEST_F(ModuleTest, givenBuildFlagsWithEnableZebinThenInternalOptionsContainsAllowZebin) { + auto module = std::make_unique(device, nullptr, ModuleType::User); + ASSERT_NE(nullptr, module); + + std::string buildOptions; + std::string internalBuildOptions; + + module->createBuildOptions(NEO::CompilerOptions::enableZebin.str().c_str(), buildOptions, internalBuildOptions); + + EXPECT_FALSE(NEO::CompilerOptions::contains(internalBuildOptions, NEO::CompilerOptions::enableZebin)); + EXPECT_TRUE(NEO::CompilerOptions::contains(internalBuildOptions, NEO::CompilerOptions::allowZebin)); +} + TEST_F(ModuleTest, givenSrcOptLevelInSrcNamesWhenMovingBuildOptionsThenOptionIsRemovedFromSrcNamesAndTranslatedOptionsStoredInDstNames) { auto module = std::make_unique(device, nullptr, ModuleType::User); ASSERT_NE(nullptr, module); diff --git a/opencl/source/program/program.cpp b/opencl/source/program/program.cpp index 84bff04bcb..ca6b5312c6 100644 --- a/opencl/source/program/program.cpp +++ b/opencl/source/program/program.cpp @@ -189,7 +189,7 @@ cl_int Program::createProgramFromBinary( this->isSpirV = NEO::isSpirVBitcode(ArrayRef(reinterpret_cast(this->irBinary.get()), this->irBinarySize)); this->options = singleDeviceBinary.buildOptions.str(); if (singleDeviceBinary.format == NEO::DeviceBinaryFormat::Zebin) { - this->options += " " + NEO::CompilerOptions::allowZebin.str(); + this->options += " " + NEO::CompilerOptions::enableZebin.str(); } this->buildInfos[rootDeviceIndex].debugData = makeCopy(reinterpret_cast(singleDeviceBinary.debugData.begin()), singleDeviceBinary.debugData.size()); @@ -486,9 +486,9 @@ void Program::disableZebinIfVmeEnabled(std::string &options, std::string &intern } if (containsVme(options, vmeOptions) || containsVme(sourceCode, vmeEnabledExtensions)) { - auto pos = options.find(CompilerOptions::allowZebin.str()); + auto pos = options.find(CompilerOptions::enableZebin.str()); if (pos != std::string::npos) { - options.erase(pos, pos + CompilerOptions::allowZebin.length()); + options.erase(pos, pos + CompilerOptions::enableZebin.length()); } internalOptions += " " + CompilerOptions::disableZebin.str(); } diff --git a/opencl/test/unit_test/program/program_tests.cpp b/opencl/test/unit_test/program/program_tests.cpp index 061e5b116b..973f381681 100644 --- a/opencl/test/unit_test/program/program_tests.cpp +++ b/opencl/test/unit_test/program/program_tests.cpp @@ -2075,7 +2075,7 @@ TEST_F(ProgramTests, GivenNullContextWhenCreatingProgramFromGenBinaryThenSuccess delete pProgram; } -TEST_F(ProgramTests, whenCreatingFromZebinThenAppendAllowZebinFlagToBuildOptions) { +TEST_F(ProgramTests, whenCreatingFromZebinThenAppendEnableZebinFlagToBuildOptions) { if (sizeof(void *) != 8U) { GTEST_SKIP(); } @@ -2088,7 +2088,7 @@ TEST_F(ProgramTests, whenCreatingFromZebinThenAppendAllowZebinFlagToBuildOptions cl_int retVal = program->createProgramFromBinary(zebin.storage.data(), zebin.storage.size(), *device); EXPECT_EQ(CL_SUCCESS, retVal); - auto expectedOptions = " " + NEO::CompilerOptions::allowZebin.str(); + auto expectedOptions = " " + NEO::CompilerOptions::enableZebin.str(); EXPECT_STREQ(expectedOptions.c_str(), program->options.c_str()); } @@ -3517,28 +3517,28 @@ TEST(ProgramVmeUsage, givenVmeOptionsWhenDisableZebinIfVmeEnabledIsCalledThenZeb MockProgram program(toClDeviceVector(device)); { - std::string options = CompilerOptions::allowZebin.str(); + std::string options = CompilerOptions::enableZebin.str(); std::string internalOptions = ""; program.disableZebinIfVmeEnabled(options, internalOptions, ""); - EXPECT_TRUE(CompilerOptions::contains(options, CompilerOptions::allowZebin)); + EXPECT_TRUE(CompilerOptions::contains(options, CompilerOptions::enableZebin)); EXPECT_FALSE(CompilerOptions::contains(internalOptions, CompilerOptions::disableZebin)); } { - std::string options = CompilerOptions::allowZebin.str() + " cl_intel_device_side_vme_enable"; + std::string options = CompilerOptions::enableZebin.str() + " cl_intel_device_side_vme_enable"; std::string internalOptions = ""; DebugManager.flags.DontDisableZebinIfVmeUsed = false; program.disableZebinIfVmeEnabled(options, internalOptions, ""); - EXPECT_FALSE(CompilerOptions::contains(options, CompilerOptions::allowZebin)); + EXPECT_FALSE(CompilerOptions::contains(options, CompilerOptions::enableZebin)); EXPECT_TRUE(CompilerOptions::contains(internalOptions, CompilerOptions::disableZebin)); } { - std::string options = CompilerOptions::allowZebin.str() + " cl_intel_device_side_vme_enable"; + std::string options = CompilerOptions::enableZebin.str() + " cl_intel_device_side_vme_enable"; std::string internalOptions = ""; DebugManager.flags.DontDisableZebinIfVmeUsed = true; program.disableZebinIfVmeEnabled(options, internalOptions, ""); - EXPECT_TRUE(CompilerOptions::contains(options, CompilerOptions::allowZebin)); + EXPECT_TRUE(CompilerOptions::contains(options, CompilerOptions::enableZebin)); EXPECT_FALSE(CompilerOptions::contains(internalOptions, CompilerOptions::disableZebin)); } { @@ -3546,7 +3546,7 @@ TEST(ProgramVmeUsage, givenVmeOptionsWhenDisableZebinIfVmeEnabledIsCalledThenZeb std::string internalOptions = ""; DebugManager.flags.DontDisableZebinIfVmeUsed = false; program.disableZebinIfVmeEnabled(options, internalOptions, ""); - EXPECT_FALSE(CompilerOptions::contains(options, CompilerOptions::allowZebin)); + EXPECT_FALSE(CompilerOptions::contains(options, CompilerOptions::enableZebin)); EXPECT_TRUE(CompilerOptions::contains(internalOptions, CompilerOptions::disableZebin)); } { @@ -3554,7 +3554,7 @@ TEST(ProgramVmeUsage, givenVmeOptionsWhenDisableZebinIfVmeEnabledIsCalledThenZeb std::string internalOptions = ""; DebugManager.flags.DontDisableZebinIfVmeUsed = true; program.disableZebinIfVmeEnabled(options, internalOptions, ""); - EXPECT_FALSE(CompilerOptions::contains(options, CompilerOptions::allowZebin)); + EXPECT_FALSE(CompilerOptions::contains(options, CompilerOptions::enableZebin)); EXPECT_FALSE(CompilerOptions::contains(internalOptions, CompilerOptions::disableZebin)); } } @@ -3565,20 +3565,20 @@ TEST(ProgramVmeUsage, givenVmeExtensionsEnabledInSourceCodeWhenDisableZebinIfVme MockProgram program(toClDeviceVector(device)); { - std::string options = CompilerOptions::allowZebin.str(); + std::string options = CompilerOptions::enableZebin.str(); std::string internalOptions = ""; std::string sourceCode = "cl_intel_motion_estimation"; program.disableZebinIfVmeEnabled(options, internalOptions, sourceCode); - EXPECT_TRUE(CompilerOptions::contains(options, CompilerOptions::allowZebin)); + EXPECT_TRUE(CompilerOptions::contains(options, CompilerOptions::enableZebin)); EXPECT_FALSE(CompilerOptions::contains(internalOptions, CompilerOptions::disableZebin)); } { - std::string options = CompilerOptions::allowZebin.str(); + std::string options = CompilerOptions::enableZebin.str(); std::string internalOptions = ""; std::string sourceCode = "cl_intel_motion_estimation : disable"; program.disableZebinIfVmeEnabled(options, internalOptions, sourceCode); - EXPECT_TRUE(CompilerOptions::contains(options, CompilerOptions::allowZebin)); + EXPECT_TRUE(CompilerOptions::contains(options, CompilerOptions::enableZebin)); EXPECT_FALSE(CompilerOptions::contains(internalOptions, CompilerOptions::disableZebin)); } @@ -3591,20 +3591,20 @@ TEST(ProgramVmeUsage, givenVmeExtensionsEnabledInSourceCodeWhenDisableZebinIfVme std::string sourceCode = extension; { - std::string options = CompilerOptions::allowZebin.str(); + std::string options = CompilerOptions::enableZebin.str(); std::string internalOptions = ""; DebugManager.flags.DontDisableZebinIfVmeUsed = false; program.disableZebinIfVmeEnabled(options, internalOptions, sourceCode); - EXPECT_FALSE(CompilerOptions::contains(options, CompilerOptions::allowZebin)); + EXPECT_FALSE(CompilerOptions::contains(options, CompilerOptions::enableZebin)); EXPECT_TRUE(CompilerOptions::contains(internalOptions, CompilerOptions::disableZebin)); } { - std::string options = CompilerOptions::allowZebin.str(); + std::string options = CompilerOptions::enableZebin.str(); std::string internalOptions = ""; DebugManager.flags.DontDisableZebinIfVmeUsed = true; program.disableZebinIfVmeEnabled(options, internalOptions, sourceCode); - EXPECT_TRUE(CompilerOptions::contains(options, CompilerOptions::allowZebin)); + EXPECT_TRUE(CompilerOptions::contains(options, CompilerOptions::enableZebin)); EXPECT_FALSE(CompilerOptions::contains(internalOptions, CompilerOptions::disableZebin)); } } @@ -3879,4 +3879,4 @@ TEST(ProgramGenerateDefaultArgsMetadataTests, whenGeneratingDefaultMetadataForSa buildInfo.kernelInfoArray.clear(); buildInfo.unpackedDeviceBinary.release(); -} \ No newline at end of file +} diff --git a/opencl/test/unit_test/program/program_with_kernel_debug_tests.cpp b/opencl/test/unit_test/program/program_with_kernel_debug_tests.cpp index ea05f76123..0d476288e5 100644 --- a/opencl/test/unit_test/program/program_with_kernel_debug_tests.cpp +++ b/opencl/test/unit_test/program/program_with_kernel_debug_tests.cpp @@ -70,7 +70,7 @@ HWTEST_F(ZebinFallbackToPatchtokensLegacyDebugger, WhenCreatingProgramFromNonBui EXPECT_FALSE(program->isCreatedFromBinary); EXPECT_TRUE(program->requiresRebuild); - EXPECT_FALSE(CompilerOptions::contains(program->options, CompilerOptions::allowZebin)); + EXPECT_FALSE(CompilerOptions::contains(program->options, CompilerOptions::enableZebin)); } HWTEST_F(ZebinFallbackToPatchtokensLegacyDebugger, WhenCreatingProgramFromNonBuiltinZeBinaryWithoutSpirvDataIncludedAndLegacyDebuggerAttachedThenErrorIsReturned) { diff --git a/shared/source/compiler_interface/compiler_options.h b/shared/source/compiler_interface/compiler_options.h index aed1e46bfc..e6d2d467a0 100644 --- a/shared/source/compiler_interface/compiler_options.h +++ b/shared/source/compiler_interface/compiler_options.h @@ -34,6 +34,7 @@ inline constexpr ConstStringRef uniformWorkgroupSize = "-cl-uniform-work-group-s inline constexpr ConstStringRef forceEmuInt32DivRem = "-cl-intel-force-emu-int32divrem"; inline constexpr ConstStringRef forceEmuInt32DivRemSP = "-cl-intel-force-emu-sp-int32divrem"; inline constexpr ConstStringRef allowZebin = "-cl-intel-allow-zebin"; +inline constexpr ConstStringRef enableZebin = "-cl-intel-enable-zebin"; inline constexpr ConstStringRef disableZebin = "-cl-intel-disable-zebin"; inline constexpr ConstStringRef enableImageSupport = "-D__IMAGE_SUPPORT__=1"; inline constexpr ConstStringRef optLevel = "-ze-opt-level=O"; diff --git a/shared/source/program/program_info.cpp b/shared/source/program/program_info.cpp index f5f9db5880..05ab1ccb87 100644 --- a/shared/source/program/program_info.cpp +++ b/shared/source/program/program_info.cpp @@ -52,8 +52,8 @@ bool isRebuiltToPatchtokensRequired(Device *neoDevice, ArrayRef a auto isSourceLevelDebuggerActive = (nullptr != neoDevice->getSourceLevelDebugger()); auto isZebinFormat = NEO::isDeviceBinaryFormat(archive); if ((isSourceLevelDebuggerActive || isVmeUsed) && isZebinFormat) { - auto pos = optionsString.find(NEO::CompilerOptions::allowZebin.str()); - optionsString.erase(pos, pos + NEO::CompilerOptions::allowZebin.length()); + auto pos = optionsString.find(NEO::CompilerOptions::enableZebin.str()); + optionsString.erase(pos, pos + NEO::CompilerOptions::enableZebin.length()); optionsString += " " + NEO::CompilerOptions::disableZebin.str(); return true; } diff --git a/shared/test/unit_test/program/program_info_tests.cpp b/shared/test/unit_test/program/program_info_tests.cpp index 8e2a6397ef..a9b3c928f8 100644 --- a/shared/test/unit_test/program/program_info_tests.cpp +++ b/shared/test/unit_test/program/program_info_tests.cpp @@ -69,12 +69,12 @@ TEST(RequiresRebuildWithPatchtokens, givenLegacyDebuggerAttachedAndZebinaryForma auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); device->getRootDeviceEnvironmentRef().debugger.reset(new MockActiveSourceLevelDebugger); - std::string options{NEO::CompilerOptions::allowZebin}; + std::string options{NEO::CompilerOptions::enableZebin}; bool isBuiltIn{false}; bool rebuildRequired = isRebuiltToPatchtokensRequired(device.get(), ArrayRef::fromAny(zebin.storage.data(), zebin.storage.size()), options, isBuiltIn, false); EXPECT_TRUE(rebuildRequired); - EXPECT_FALSE(NEO::CompilerOptions::contains(options, NEO::CompilerOptions::allowZebin)); + EXPECT_FALSE(NEO::CompilerOptions::contains(options, NEO::CompilerOptions::enableZebin)); EXPECT_TRUE(NEO::CompilerOptions::contains(options, NEO::CompilerOptions::disableZebin)); } @@ -83,18 +83,18 @@ TEST(RequiresRebuildWithPatchtokens, givenNoLegacyDebuggerAttachedOrNonZebinaryF auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); device->getRootDeviceEnvironmentRef().debugger.reset(new MockActiveSourceLevelDebugger); - std::string options{NEO::CompilerOptions::allowZebin}; + std::string options{NEO::CompilerOptions::enableZebin}; bool isBuiltIn{true}; bool rebuildRequired = isRebuiltToPatchtokensRequired(device.get(), ArrayRef::fromAny(zebin.storage.data(), zebin.storage.size()), options, isBuiltIn, false); EXPECT_FALSE(rebuildRequired); - EXPECT_TRUE(NEO::CompilerOptions::contains(options, NEO::CompilerOptions::allowZebin)); + EXPECT_TRUE(NEO::CompilerOptions::contains(options, NEO::CompilerOptions::enableZebin)); isBuiltIn = false; device->getRootDeviceEnvironmentRef().debugger.reset(nullptr); rebuildRequired = isRebuiltToPatchtokensRequired(device.get(), ArrayRef::fromAny(zebin.storage.data(), zebin.storage.size()), options, isBuiltIn, false); EXPECT_FALSE(rebuildRequired); - EXPECT_TRUE(NEO::CompilerOptions::contains(options, NEO::CompilerOptions::allowZebin)); + EXPECT_TRUE(NEO::CompilerOptions::contains(options, NEO::CompilerOptions::enableZebin)); device->getRootDeviceEnvironmentRef().debugger.reset(new MockActiveSourceLevelDebugger); for (auto idx = 0; idx < 4; idx++) { @@ -102,26 +102,26 @@ TEST(RequiresRebuildWithPatchtokens, givenNoLegacyDebuggerAttachedOrNonZebinaryF } // broken header - zebinary format will not be detected rebuildRequired = isRebuiltToPatchtokensRequired(device.get(), ArrayRef::fromAny(zebin.storage.data(), zebin.storage.size()), options, isBuiltIn, false); EXPECT_FALSE(rebuildRequired); - EXPECT_TRUE(NEO::CompilerOptions::contains(options, NEO::CompilerOptions::allowZebin)); + EXPECT_TRUE(NEO::CompilerOptions::contains(options, NEO::CompilerOptions::enableZebin)); } TEST(RequiresRebuildWithPatchtokens, givenVmeUsedWhenIsRebuiltToPatchtokensRequiredThenReturnFalse) { ZebinTestData::ValidEmptyProgram<> zebin; auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); device->getRootDeviceEnvironmentRef().debugger.reset(nullptr); - std::string options{NEO::CompilerOptions::allowZebin}; + std::string options{NEO::CompilerOptions::enableZebin}; bool isBuiltIn = false; { bool isVmeUsed = false; bool rebuildRequired = isRebuiltToPatchtokensRequired(device.get(), ArrayRef::fromAny(zebin.storage.data(), zebin.storage.size()), options, isBuiltIn, isVmeUsed); EXPECT_FALSE(rebuildRequired); - EXPECT_TRUE(NEO::CompilerOptions::contains(options, NEO::CompilerOptions::allowZebin)); + EXPECT_TRUE(NEO::CompilerOptions::contains(options, NEO::CompilerOptions::enableZebin)); } { bool isVmeUsed = true; bool rebuildRequired = isRebuiltToPatchtokensRequired(device.get(), ArrayRef::fromAny(zebin.storage.data(), zebin.storage.size()), options, isBuiltIn, isVmeUsed); EXPECT_TRUE(rebuildRequired); - EXPECT_FALSE(NEO::CompilerOptions::contains(options, NEO::CompilerOptions::allowZebin)); + EXPECT_FALSE(NEO::CompilerOptions::contains(options, NEO::CompilerOptions::enableZebin)); } -} \ No newline at end of file +}