From 01ee3dcb9463d4175b0efff07d3da16585bde971 Mon Sep 17 00:00:00 2001 From: ksenia-shkileva Date: Tue, 3 Sep 2024 16:14:31 +0000 Subject: [PATCH] Remove all occurrances of use_elf_compiler_backend option --- .../include/intel_npu/al/config/compiler.hpp | 29 ------------ .../src/al/include/npu_private_properties.hpp | 46 ------------------- .../intel_npu/src/al/src/config/compiler.cpp | 45 ------------------ .../intel_npu/src/plugin/include/metrics.hpp | 1 - .../src/plugin/src/compiled_model.cpp | 6 --- .../intel_npu/src/plugin/src/plugin.cpp | 6 --- .../ov_plugin/internal_properties_tests.cpp | 3 -- .../overload/compiled_model/property.cpp | 1 - .../behavior/compiled_model/properties.cpp | 1 - .../behavior/ov_plugin/caching_tests.cpp | 11 ----- 10 files changed, 149 deletions(-) diff --git a/src/plugins/intel_npu/src/al/include/intel_npu/al/config/compiler.hpp b/src/plugins/intel_npu/src/al/include/intel_npu/al/config/compiler.hpp index fc7f25d62101d2..e1fbbe75bae3f1 100644 --- a/src/plugins/intel_npu/src/al/include/intel_npu/al/config/compiler.hpp +++ b/src/plugins/intel_npu/src/al/include/intel_npu/al/config/compiler.hpp @@ -16,7 +16,6 @@ namespace ov { namespace intel_npu { std::string_view stringifyEnum(CompilerType val); -std::string_view stringifyEnum(ElfCompilerBackend val); } // namespace intel_npu @@ -308,34 +307,6 @@ struct DMA_ENGINES final : OptionBase { #endif }; -// -// USE_ELF_COMPILER_BACKEND -// - -struct USE_ELF_COMPILER_BACKEND final : OptionBase { - static std::string_view key() { - return ov::intel_npu::use_elf_compiler_backend.name(); - } - - static constexpr std::string_view getTypeName() { - return "ov::intel_npu::ElfCompilerBackend"; - } - -#ifdef NPU_PLUGIN_DEVELOPER_BUILD - static std::string_view envVar() { - return "IE_NPU_USE_ELF_COMPILER_BACKEND"; - } -#endif - - static ov::intel_npu::ElfCompilerBackend defaultValue() { - return ov::intel_npu::ElfCompilerBackend::AUTO; - } - - static ov::intel_npu::ElfCompilerBackend parse(std::string_view val); - - static std::string toString(const ov::intel_npu::ElfCompilerBackend& val); -}; - // // BACKEND_COMPILATION_PARAMS // diff --git a/src/plugins/intel_npu/src/al/include/npu_private_properties.hpp b/src/plugins/intel_npu/src/al/include/npu_private_properties.hpp index 0c5a04ce0c0d83..a1422cfd66be61 100644 --- a/src/plugins/intel_npu/src/al/include/npu_private_properties.hpp +++ b/src/plugins/intel_npu/src/al/include/npu_private_properties.hpp @@ -113,44 +113,6 @@ inline std::ostream& operator<<(std::ostream& out, const CompilerType& fmt) { return out; } -/** - * @brief [Only for NPU Plugin] - * Type: String. Default is "AUTO". - * This option is added for enabling ELF backend. - * Possible values: "AUTO", "YES", "NO". - */ - -enum class ElfCompilerBackend { - AUTO = 0, - NO = 1, - YES = 2, -}; - -/** - * @brief Prints a string representation of ov::intel_npu::ElfCompilerBackend to a stream - * @param out An output stream to send to - * @param fmt A elf compiler backend value to print to a stream - * @return A reference to the `out` stream - * @note Configuration API v 2.0 - */ -inline std::ostream& operator<<(std::ostream& out, const ElfCompilerBackend& fmt) { - switch (fmt) { - case ElfCompilerBackend::AUTO: { - out << "AUTO"; - } break; - case ElfCompilerBackend::NO: { - out << "NO"; - } break; - case ElfCompilerBackend::YES: { - out << "YES"; - } break; - default: - out << static_cast(fmt); - break; - } - return out; -} - /** * @brief [Only for NPU Plugin] * Type: String. Default is "AUTO". @@ -328,14 +290,6 @@ static constexpr ov::Property dynamic_shape_to_static{"NPU_DYNAMIC_ */ static constexpr ov::Property profiling_type{"NPU_PROFILING_TYPE"}; -/** - * @brief - * Type: String. Default is "AUTO". - * Sets the format in which the compiled model is stored. - * Possible values: "AUTO", "YES", "NO". - */ -static constexpr ov::Property use_elf_compiler_backend{"NPU_USE_ELF_COMPILER_BACKEND"}; - /** * @brief [Only for NPU Plugin] * Type: String. Default is "AUTO". diff --git a/src/plugins/intel_npu/src/al/src/config/compiler.cpp b/src/plugins/intel_npu/src/al/src/config/compiler.cpp index f3c37a824353da..9bfc94187610f5 100644 --- a/src/plugins/intel_npu/src/al/src/config/compiler.cpp +++ b/src/plugins/intel_npu/src/al/src/config/compiler.cpp @@ -22,7 +22,6 @@ void intel_npu::registerCompilerOptions(OptionsDesc& desc) { desc.add(); desc.add(); desc.add(); - desc.add(); desc.add(); desc.add(); } @@ -76,47 +75,3 @@ std::string intel_npu::COMPILER_TYPE::toString(const ov::intel_npu::CompilerType return strStream.str(); } - -// -// USE_ELF_COMPILER_BACKEND -// - -std::string_view ov::intel_npu::stringifyEnum(ov::intel_npu::ElfCompilerBackend val) { - switch (val) { - case ov::intel_npu::ElfCompilerBackend::AUTO: - return "AUTO"; - case ov::intel_npu::ElfCompilerBackend::NO: - return "NO"; - case ov::intel_npu::ElfCompilerBackend::YES: - return "YES"; - default: - return ""; - } -} - -ov::intel_npu::ElfCompilerBackend intel_npu::USE_ELF_COMPILER_BACKEND::parse(std::string_view val) { - if (val == stringifyEnum(ov::intel_npu::ElfCompilerBackend::AUTO)) { - return ov::intel_npu::ElfCompilerBackend::AUTO; - } else if (val == stringifyEnum(ov::intel_npu::ElfCompilerBackend::NO)) { - return ov::intel_npu::ElfCompilerBackend::NO; - } else if (val == stringifyEnum(ov::intel_npu::ElfCompilerBackend::YES)) { - return ov::intel_npu::ElfCompilerBackend::YES; - } - - OPENVINO_THROW("Value '", val, "' is not a valid USE_ELF_COMPILER_BACKEND option"); -} - -std::string intel_npu::USE_ELF_COMPILER_BACKEND::toString(const ov::intel_npu::ElfCompilerBackend& val) { - std::stringstream strStream; - if (val == ov::intel_npu::ElfCompilerBackend::AUTO) { - strStream << "AUTO"; - } else if (val == ov::intel_npu::ElfCompilerBackend::NO) { - strStream << "NO"; - } else if (val == ov::intel_npu::ElfCompilerBackend::YES) { - strStream << "YES"; - } else { - OPENVINO_THROW("No valid string for current USE_ELF_COMPILER_BACKEND option"); - } - - return strStream.str(); -} diff --git a/src/plugins/intel_npu/src/plugin/include/metrics.hpp b/src/plugins/intel_npu/src/plugin/include/metrics.hpp index abd24a3c1b092c..3875ba61442037 100644 --- a/src/plugins/intel_npu/src/plugin/include/metrics.hpp +++ b/src/plugins/intel_npu/src/plugin/include/metrics.hpp @@ -63,7 +63,6 @@ class Metrics final { ov::intel_npu::compilation_mode.name(), ov::intel_npu::driver_version.name(), ov::intel_npu::compiler_type.name(), - ov::intel_npu::use_elf_compiler_backend.name(), ov::intel_npu::batch_mode.name(), ov::hint::execution_mode.name()}; diff --git a/src/plugins/intel_npu/src/plugin/src/compiled_model.cpp b/src/plugins/intel_npu/src/plugin/src/compiled_model.cpp index 914879feee359f..a6d23ec883538a 100644 --- a/src/plugins/intel_npu/src/plugin/src/compiled_model.cpp +++ b/src/plugins/intel_npu/src/plugin/src/compiled_model.cpp @@ -373,12 +373,6 @@ void CompiledModel::initialize_properties() { [](const Config& config) { return config.getString(); }}}, - {ov::intel_npu::use_elf_compiler_backend.name(), - {false, - ov::PropertyMutability::RO, - [](const Config& config) { - return config.getString(); - }}}, {ov::intel_npu::create_executor.name(), {false, ov::PropertyMutability::RO, diff --git a/src/plugins/intel_npu/src/plugin/src/plugin.cpp b/src/plugins/intel_npu/src/plugin/src/plugin.cpp index 260768b3690dd1..3b43177b60684d 100644 --- a/src/plugins/intel_npu/src/plugin/src/plugin.cpp +++ b/src/plugins/intel_npu/src/plugin/src/plugin.cpp @@ -527,12 +527,6 @@ Plugin::Plugin() [&](const Config&) { return _metrics->GetBackendName(); }}}, - {ov::intel_npu::use_elf_compiler_backend.name(), - {false, - ov::PropertyMutability::RW, - [](const Config& config) { - return config.getString(); - }}}, {ov::intel_npu::create_executor.name(), {false, ov::PropertyMutability::RW, diff --git a/src/plugins/intel_npu/tests/functional/behavior/ov_plugin/internal_properties_tests.cpp b/src/plugins/intel_npu/tests/functional/behavior/ov_plugin/internal_properties_tests.cpp index 006b7a19fb6874..835673148b1e87 100644 --- a/src/plugins/intel_npu/tests/functional/behavior/ov_plugin/internal_properties_tests.cpp +++ b/src/plugins/intel_npu/tests/functional/behavior/ov_plugin/internal_properties_tests.cpp @@ -146,14 +146,11 @@ const std::vector CorrectPluginMutableProperties = { removeDeviceNameOnlyID( ov::test::utils::getTestsDeviceNameFromEnvironmentOr(std::string(ov::intel_npu::Platform::AUTO_DETECT)))}}, {{ov::intel_npu::stepping.name(), 0}}, - {{ov::intel_npu::use_elf_compiler_backend.name(), ov::intel_npu::ElfCompilerBackend::NO}}, {{ov::intel_npu::profiling_type.name(), ov::intel_npu::ProfilingType::INFER}}}; const std::vector IncorrectMutablePropertiesWrongValueTypes = { {{ov::intel_npu::compilation_mode.name(), -3.6}}, - {{ov::intel_npu::compiler_type.name(), ov::intel_npu::ElfCompilerBackend::NO}}, {{ov::intel_npu::stepping.name(), "V1"}}, - {{ov::intel_npu::use_elf_compiler_backend.name(), "N"}}, {{ov::intel_npu::profiling_type.name(), 10}}, {{ov::intel_npu::dma_engines.name(), false}}, }; diff --git a/src/plugins/intel_npu/tests/functional/internal/overload/compiled_model/property.cpp b/src/plugins/intel_npu/tests/functional/internal/overload/compiled_model/property.cpp index 8e01ec7f927e5b..6265ec42156d6b 100644 --- a/src/plugins/intel_npu/tests/functional/internal/overload/compiled_model/property.cpp +++ b/src/plugins/intel_npu/tests/functional/internal/overload/compiled_model/property.cpp @@ -134,7 +134,6 @@ std::vector> plugin_internal_mutable_properties {ov::intel_npu::max_tiles.name(), ov::Any(8)}, {ov::intel_npu::stepping.name(), ov::Any(4)}, {ov::intel_npu::dpu_groups.name(), ov::Any(2)}, - {ov::intel_npu::use_elf_compiler_backend.name(), ov::Any(ov::intel_npu::ElfCompilerBackend::YES)}, {ov::intel_npu::create_executor.name(), ov::Any(0)}, }; diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/compiled_model/properties.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/compiled_model/properties.cpp index 8abe86a77c55c2..2ce6e3f19168d3 100644 --- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/compiled_model/properties.cpp +++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/compiled_model/properties.cpp @@ -46,7 +46,6 @@ const std::vector> compiledModelProperties = { {ov::hint::model_priority.name(), ov::Any(ov::hint::Priority::HIGH)}, {ov::intel_npu::tiles.name(), ov::Any(2)}, {ov::intel_npu::profiling_type.name(), ov::Any(ov::intel_npu::ProfilingType::INFER)}, - {ov::intel_npu::use_elf_compiler_backend.name(), ov::Any(ov::intel_npu::ElfCompilerBackend::NO)}, {ov::intel_npu::create_executor.name(), ov::Any(2)}}; const std::string& expectedModelName = []() -> std::string { diff --git a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/caching_tests.cpp b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/caching_tests.cpp index eee46865560dbc..ef2c75a1607f63 100644 --- a/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/caching_tests.cpp +++ b/src/plugins/intel_npu/tests/functional/shared_tests_instances/behavior/ov_plugin/caching_tests.cpp @@ -92,17 +92,6 @@ const std::vector NPULoadFromFileConfigs = { }; const std::vector> NPUCompiledKernelsCacheTest = { - std::make_pair( - {ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT), - ov::intel_npu::use_elf_compiler_backend(ov::intel_npu::ElfCompilerBackend::NO)}, - "blob"), - std::make_pair( - {ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY), - ov::intel_npu::use_elf_compiler_backend(ov::intel_npu::ElfCompilerBackend::NO)}, - "blob"), - std::make_pair( - {ov::intel_npu::use_elf_compiler_backend(ov::intel_npu::ElfCompilerBackend::NO)}, - "blob"), std::make_pair({ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)}, "blob"), std::make_pair({ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)},