Remove unsused path_join_w util function#35630
Open
almilosz wants to merge 2 commits intoopenvinotoolkit:masterfrom
Open
Remove unsused path_join_w util function#35630almilosz wants to merge 2 commits intoopenvinotoolkit:masterfrom
almilosz wants to merge 2 commits intoopenvinotoolkit:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
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()onov::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); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details:
std::wstring path_join_w(std::initializer_list<std::wstring>&& paths);// TODO: Remove string() / wstring() casts on function call siteand a few.string()callsTickets:
AI Assistance: