Skip to content

Commit

Permalink
Remove legacy ie::Version and replaced by ov::Version (openvinotoolki…
Browse files Browse the repository at this point in the history
…t#22582)

Co-authored-by: Ilya Lavrenov <[email protected]>
  • Loading branch information
riverlijunjie and ilya-lavrenov authored Feb 1, 2024
1 parent 54c7684 commit eb9228c
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 165 deletions.
2 changes: 1 addition & 1 deletion cmake/developer_package/version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ macro(ov_parse_ci_build_number repo_root)
endforeach()
endfunction()

# detect OpenVINO version via openvino/core/version.hpp and ie_version.hpp
# detect OpenVINO version via openvino/core/version.hpp
ov_compare_version_with_headers()

# detect commit number
Expand Down
1 change: 0 additions & 1 deletion src/cmake/openvino.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ add_library(${TARGET_NAME}
$<TARGET_OBJECTS:openvino_core_obj_version>
$<TARGET_OBJECTS:openvino_frontend_common_obj>
$<TARGET_OBJECTS:openvino_runtime_obj>
$<TARGET_OBJECTS:openvino_runtime_obj_version>
$<TARGET_OBJECTS:openvino_transformations_obj>
$<TARGET_OBJECTS:openvino_lp_transformations_obj>
$<$<TARGET_EXISTS:openvino_proxy_plugin_obj>:$<TARGET_OBJECTS:openvino_proxy_plugin_obj>>)
Expand Down
1 change: 0 additions & 1 deletion src/inference/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ add_library(${TARGET_NAME}_obj OBJECT
${LIBRARY_HEADERS}
${PUBLIC_HEADERS})

ov_add_version_defines(src/ie_version.cpp ${TARGET_NAME}_obj)

if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(${TARGET_NAME}_obj PUBLIC OPENVINO_STATIC_LIBRARY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "openvino/runtime/iplugin.hpp"
#include "openvino/runtime/so_ptr.hpp"
#include "openvino/util/pp.hpp"
#include "ie_version.hpp"

using namespace ov::threading;

Expand Down Expand Up @@ -119,7 +118,7 @@ GetSupportedNodes(const std::shared_ptr<const ov::Model>& model,
*/
class INFERENCE_ENGINE_1_0_DEPRECATED INFERENCE_ENGINE_API_CLASS(IInferencePlugin)
: public std::enable_shared_from_this<IInferencePlugin> {
class VersionStore : public Version {
class VersionStore : public ov::Version {
void copyFrom(const Version& v);

public:
Expand All @@ -140,13 +139,13 @@ class INFERENCE_ENGINE_1_0_DEPRECATED INFERENCE_ENGINE_API_CLASS(IInferencePlugi
* @brief Sets a plugin version
* @param version A version to set
*/
void SetVersion(const Version& version);
void SetVersion(const ov::Version& version);

/**
* @brief Gets a plugin version
* @return A const InferenceEngine::Version object
* @return A const ov::Version object
*/
const Version& GetVersion() const;
const ov::Version& GetVersion() const;

/**
* @brief Provides a name of a plugin
Expand Down
4 changes: 2 additions & 2 deletions src/inference/include/ie/ie_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <vector>

#include "cpp/ie_executable_network.hpp"
#include "ie_version.hpp"
#include "openvino/core/version.hpp"

namespace InferenceEngine {

Expand Down Expand Up @@ -61,7 +61,7 @@ class INFERENCE_ENGINE_1_0_DEPRECATED INFERENCE_ENGINE_API_CLASS(Core) {
* @param deviceName Device name to identify plugin
* @return A vector of versions
*/
std::map<std::string, Version> GetVersions(const std::string& deviceName) const;
std::map<std::string, ov::Version> GetVersions(const std::string& deviceName) const;

#ifdef OPENVINO_ENABLE_UNICODE_PATH_SUPPORT
/**
Expand Down
127 changes: 0 additions & 127 deletions src/inference/include/ie/ie_version.hpp

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ IInferencePlugin::IInferencePlugin() : _executorManager(ov::threading::executor_
void IInferencePlugin::VersionStore::copyFrom(const Version& v) {
description = v.description;
buildNumber = v.buildNumber;
apiVersion = v.apiVersion;
}

IInferencePlugin::VersionStore::VersionStore(const Version& v) {
Expand All @@ -83,11 +82,11 @@ IInferencePlugin::VersionStore& IInferencePlugin::VersionStore::operator=(const
return *this;
}

void IInferencePlugin::SetVersion(const Version& version) {
void IInferencePlugin::SetVersion(const ov::Version& version) {
_version = VersionStore(version);
}

const Version& IInferencePlugin::GetVersion() const {
const ov::Version& IInferencePlugin::GetVersion() const {
return _version;
}

Expand Down
3 changes: 1 addition & 2 deletions src/inference/src/dev/converter_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "ie_input_info.hpp"
#include "ie_layouts.h"
#include "ie_ngraph_utils.hpp"
#include "ie_version.hpp"
#include "iplugin_wrapper.hpp"
#include "legacy_op_extension.hpp"
#include "openvino/core/except.hpp"
Expand Down Expand Up @@ -212,7 +211,7 @@ class IInferencePluginWrapper : public InferenceEngine::IInferencePlugin {
public:
IInferencePluginWrapper(const ov::SoPtr<ov::IPlugin>& plugin) : m_plugin(plugin) {
auto& ver = plugin->get_version();
InferenceEngine::Version version;
ov::Version version;
version.buildNumber = ver.buildNumber;
version.description = ver.description;
SetVersion(version);
Expand Down
2 changes: 1 addition & 1 deletion src/inference/src/dev/core_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,7 @@ ov::SoPtr<ov::ICompiledModel> ov::CoreImpl::compile_model_and_cache(const std::s
plugin.get_property(ov::internal::compiled_model_runtime_properties.name(), {}).as<std::string>();
}
cacheContent.cacheManager->write_cache_entry(cacheContent.blobId, [&](std::ostream& networkStream) {
networkStream << ov::CompiledBlobHeader(InferenceEngine::GetInferenceEngineVersion()->buildNumber,
networkStream << ov::CompiledBlobHeader(ov::get_openvino_version().buildNumber,
ov::ModelCache::calculate_file_info(cacheContent.modelPath),
compiled_model_runtime_properties);
execNetwork->export_model(networkStream);
Expand Down
2 changes: 1 addition & 1 deletion src/inference/src/dev/core_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class CoreImpl : public InferenceEngine::ICore, public std::enable_shared_from_t

bool DeviceSupportsModelCaching(const std::string& deviceName) const override;

std::map<std::string, InferenceEngine::Version> GetVersions(const std::string& deviceName) const;
std::map<std::string, ov::Version> GetVersions(const std::string& deviceName) const;

// Common API

Expand Down
4 changes: 2 additions & 2 deletions src/inference/src/dev/core_impl_ie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ std::map<std::string, std::string> ov::CoreImpl::GetSupportedConfig(const std::s
return ov::any_copy(get_supported_property(deviceName, any_copy(configs)));
}

std::map<std::string, InferenceEngine::Version> ov::CoreImpl::GetVersions(const std::string& deviceName) const {
std::map<std::string, InferenceEngine::Version> versions;
std::map<std::string, ov::Version> ov::CoreImpl::GetVersions(const std::string& deviceName) const {
std::map<std::string, ov::Version> versions;
std::vector<std::string> deviceNames;

{
Expand Down
2 changes: 1 addition & 1 deletion src/inference/src/ie_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Core::Core(const std::string& xmlConfigFile) {
}
}

std::map<std::string, Version> Core::GetVersions(const std::string& deviceName) const {
std::map<std::string, ov::Version> Core::GetVersions(const std::string& deviceName) const {
return _impl->GetVersions(deviceName);
}

Expand Down
18 changes: 0 additions & 18 deletions src/inference/src/ie_version.cpp

This file was deleted.

0 comments on commit eb9228c

Please sign in to comment.