Skip to content

Commit

Permalink
[PYTHON/CPP/BENCHMARK_APP] Revert changes to Core, align version prin…
Browse files Browse the repository at this point in the history
…ts usin only provided methods
  • Loading branch information
PiotrKrzem committed Nov 8, 2022
1 parent a02074b commit e92c9f6
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 25 deletions.
2 changes: 1 addition & 1 deletion samples/cpp/benchmark_app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ std::string get_console_command(int argc, char* argv[]) {
std::string relative_path(argv[0]);
std::vector<char> buffer;

uint32_t len = 1024;
uint32_t len = 1;
do {
buffer.resize(len);
len = GetFullPathNameA(relative_path.data(), len, buffer.data(), nullptr);
Expand Down
6 changes: 0 additions & 6 deletions samples/cpp/common/utils/include/samples/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,6 @@ inline std::string fileExt(const std::string& filename) {
}

inline slog::LogStream& operator<<(slog::LogStream& os, const ov::Version& version) {
os << version.description << " version ";
for (int i = 0; i < 30 - strlen(version.description); i++) {
os << ".";
}
os << " " << OPENVINO_VERSION_MAJOR << "." << OPENVINO_VERSION_MINOR << "." << OPENVINO_VERSION_PATCH << slog::endl;

os << "Build ................................. ";
os << version.buildNumber << slog::endl;

Expand Down
8 changes: 0 additions & 8 deletions src/bindings/python/src/pyopenvino/core/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,6 @@ void regclass_Core(py::module m) {
:rtype: openvino.runtime.CompiledModel
)");

cls.def("get_version",
&ov::Core::get_version,
R"(
Gets OpenVINO version information.
:return: Version information.
:rtype: openvino.runtime.Version
)");

cls.def("get_versions",
&ov::Core::get_versions,
py::arg("device_name"),
Expand Down
1 change: 0 additions & 1 deletion src/inference/include/openvino/runtime/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class OPENVINO_RUNTIME_API Core {
* @param device_name Device name to identify a plugin.
* @return A vector of versions.
*/
Version get_version() const;
std::map<std::string, Version> get_versions(const std::string& device_name) const;

#ifdef OPENVINO_ENABLE_UNICODE_PATH_SUPPORT
Expand Down
2 changes: 0 additions & 2 deletions src/inference/src/ie_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1917,8 +1917,6 @@ Core::Core(const std::string& xmlConfigFile) {
#endif
}

Version Core::get_version() const {OV_CORE_CALL_STATEMENT({ return ov::get_openvino_version(); })}

std::map<std::string, Version> Core::get_versions(const std::string& deviceName) const {
OV_CORE_CALL_STATEMENT({
std::map<std::string, Version> versions;
Expand Down
8 changes: 2 additions & 6 deletions tools/benchmark_tool/openvino/tools/benchmark/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,14 @@ def add_extension(self, path_to_extensions: str=None, path_to_cldnn_config: str=
self.core.add_extension(extension)

def print_version_info(self) -> None:
version = self.core.get_version()
description = f"{version.description} version "
version = get_version()
logger.info("OpenVINO:")
logger.info(f"{description:.<39} {version.major}.{version.minor}.{version.patch}")
logger.info(f"{'Build ':.<39} {version.build_number}")
logger.info(f"{'Build ':.<39} {version}")
logger.info("")

logger.info("Device info:")
for device, version in self.core.get_versions(self.device).items():
description = f"{version.description} version "
logger.info(f"{device}")
logger.info(f"{description:.<39} {version.major}.{version.minor}.{version.patch}")
logger.info(f"{'Build ':.<39} {version.build_number}")

logger.info("")
Expand Down
2 changes: 1 addition & 1 deletion tools/benchmark_tool/openvino/tools/benchmark/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def main():
next_step()
logger.info("Parsing input parameters")
args, is_network_compiled = parse_and_check_command_line()

logger.info(f"Input command: {args_string}")

command_line_arguments = get_command_line_arguments(sys.argv)
if args.report_type:
Expand Down

0 comments on commit e92c9f6

Please sign in to comment.