Skip to content

Remove unsused path_join_w util function#35630

Open
almilosz wants to merge 2 commits intoopenvinotoolkit:masterfrom
almilosz:almilosz/remove-last-path-join
Open

Remove unsused path_join_w util function#35630
almilosz wants to merge 2 commits intoopenvinotoolkit:masterfrom
almilosz:almilosz/remove-last-path-join

Conversation

@almilosz
Copy link
Copy Markdown
Contributor

Details:

  • Removes unused std::wstring path_join_w(std::initializer_list<std::wstring>&& paths);
  • Removes // TODO: Remove string() / wstring() casts on function call site and a few .string() calls

Tickets:

AI Assistance:

  • AI assistance used: no

@almilosz almilosz requested review from barnasm1 and praasz April 30, 2026 16:22
@almilosz almilosz requested review from a team as code owners April 30, 2026 16:22
@github-actions github-actions Bot added category: Core OpenVINO Core (aka ngraph) category: IE Tests OpenVINO Test: plugins and common category: ONNX FE OpenVINO ONNX FrontEnd labels Apr 30, 2026
@mlukasze mlukasze requested a review from Copilot April 30, 2026 17:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes an unused wide-string path join helper from OpenVINO’s file utilities and updates test code to avoid unnecessary .string() conversions by passing std::filesystem::path through more directly.

Changes:

  • Added a getModelFromTestModelZoo(const std::filesystem::path&) overload to support path-based call sites.
  • Updated multiple ONNX/frontend and serialization tests to stop calling .string() on ov::util::path_join(...).
  • Removed unused ov::util::path_join_w(...) (and an obsolete TODO) from the common file utilities.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/tests/test_utils/common_test_utils/src/file_utils.cpp Adds a new getModelFromTestModelZoo overload that takes std::filesystem::path.
src/frontends/onnx/tests/op_extension.cpp Drops .string() when building model paths for getModelFromTestModelZoo(...).
src/frontends/onnx/tests/onnx_importer_test.cpp Drops .string() when building model paths for getModelFromTestModelZoo(...).
src/frontends/onnx/tests/load_from.cpp Stops converting joined paths to string; uses std::filesystem::path directly for ifstream and frontend load calls.
src/core/tests/pass/serialization/serialize.cpp Stops converting joined paths to string; passes joined paths into getModelFromTestModelZoo(...).
src/core/tests/pass/serialization/deterministicity.cpp Same as above; also splits "ir/<file>" into path components.
src/common/util/src/file_util.cpp Removes path_join_w implementation and an outdated TODO comment.
src/common/util/include/openvino/util/file_util.hpp Removes path_join_w declaration from the public header.

Comment on lines +177 to +179
std::string getModelFromTestModelZoo(const std::filesystem::path& relModelPath) {
return ov::util::path_to_string(std::filesystem::path(getExecutableDirectory()) / relModelPath);
}
Comment on lines +177 to +179
std::string getModelFromTestModelZoo(const std::filesystem::path& relModelPath) {
return ov::util::path_to_string(std::filesystem::path(getExecutableDirectory()) / relModelPath);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: Core OpenVINO Core (aka ngraph) category: IE Tests OpenVINO Test: plugins and common category: ONNX FE OpenVINO ONNX FrontEnd

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants