Skip to content

Commit

Permalink
Remove all occurrances of use_elf_compiler_backend option
Browse files Browse the repository at this point in the history
  • Loading branch information
ksenia-shkileva committed Sep 10, 2024
1 parent 52c9ae7 commit 01ee3dc
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 149 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ namespace ov {
namespace intel_npu {

std::string_view stringifyEnum(CompilerType val);
std::string_view stringifyEnum(ElfCompilerBackend val);

} // namespace intel_npu

Expand Down Expand Up @@ -308,34 +307,6 @@ struct DMA_ENGINES final : OptionBase<DMA_ENGINES, int64_t> {
#endif
};

//
// USE_ELF_COMPILER_BACKEND
//

struct USE_ELF_COMPILER_BACKEND final : OptionBase<USE_ELF_COMPILER_BACKEND, ov::intel_npu::ElfCompilerBackend> {
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
//
Expand Down
46 changes: 0 additions & 46 deletions src/plugins/intel_npu/src/al/include/npu_private_properties.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint32_t>(fmt);
break;
}
return out;
}

/**
* @brief [Only for NPU Plugin]
* Type: String. Default is "AUTO".
Expand Down Expand Up @@ -328,14 +290,6 @@ static constexpr ov::Property<std::string> dynamic_shape_to_static{"NPU_DYNAMIC_
*/
static constexpr ov::Property<ProfilingType> 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<ElfCompilerBackend> use_elf_compiler_backend{"NPU_USE_ELF_COMPILER_BACKEND"};

/**
* @brief [Only for NPU Plugin]
* Type: String. Default is "AUTO".
Expand Down
45 changes: 0 additions & 45 deletions src/plugins/intel_npu/src/al/src/config/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ void intel_npu::registerCompilerOptions(OptionsDesc& desc) {
desc.add<STEPPING>();
desc.add<MAX_TILES>();
desc.add<DMA_ENGINES>();
desc.add<USE_ELF_COMPILER_BACKEND>();
desc.add<DYNAMIC_SHAPE_TO_STATIC>();
desc.add<EXECUTION_MODE_HINT>();
}
Expand Down Expand Up @@ -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 "<UNKNOWN>";
}
}

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();
}
1 change: 0 additions & 1 deletion src/plugins/intel_npu/src/plugin/include/metrics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()};

Expand Down
6 changes: 0 additions & 6 deletions src/plugins/intel_npu/src/plugin/src/compiled_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,6 @@ void CompiledModel::initialize_properties() {
[](const Config& config) {
return config.getString<DYNAMIC_SHAPE_TO_STATIC>();
}}},
{ov::intel_npu::use_elf_compiler_backend.name(),
{false,
ov::PropertyMutability::RO,
[](const Config& config) {
return config.getString<USE_ELF_COMPILER_BACKEND>();
}}},
{ov::intel_npu::create_executor.name(),
{false,
ov::PropertyMutability::RO,
Expand Down
6 changes: 0 additions & 6 deletions src/plugins/intel_npu/src/plugin/src/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<USE_ELF_COMPILER_BACKEND>();
}}},
{ov::intel_npu::create_executor.name(),
{false,
ov::PropertyMutability::RW,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,11 @@ const std::vector<ov::AnyMap> 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<ov::AnyMap> 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}},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ std::vector<std::pair<std::string, ov::Any>> 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)},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ const std::vector<std::pair<std::string, ov::Any>> 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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,6 @@ const std::vector<ov::AnyMap> NPULoadFromFileConfigs = {
};

const std::vector<std::pair<ov::AnyMap, std::string>> NPUCompiledKernelsCacheTest = {
std::make_pair<ov::AnyMap, std::string>(
{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::AnyMap, std::string>(
{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::AnyMap, std::string>(
{ov::intel_npu::use_elf_compiler_backend(ov::intel_npu::ElfCompilerBackend::NO)},
"blob"),
std::make_pair<ov::AnyMap, std::string>({ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)},
"blob"),
std::make_pair<ov::AnyMap, std::string>({ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY)},
Expand Down

0 comments on commit 01ee3dc

Please sign in to comment.