Skip to content

Commit 5039ea5

Browse files
Merge branch 'master' into feature-flip-preprocessing
2 parents 664e77d + 6728a2c commit 5039ea5

File tree

151 files changed

+6204
-1317
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+6204
-1317
lines changed

.github/scripts/workflow_rerun/errors_to_look_for.json

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"ticket": 135715
99
},
1010
{
11-
"error_text": "error: RPC failed",
11+
"error_text": "GnuTLS recv error",
1212
"ticket": 131918
1313
},
1414
{
@@ -87,18 +87,6 @@
8787
"error_text": "because the GET request got Content-Type",
8888
"ticket": 158400
8989
},
90-
{
91-
"error_text": "Unable to make request:",
92-
"ticket": 158401
93-
},
94-
{
95-
"error_text": "Failed to make request",
96-
"ticket": 158401
97-
},
98-
{
99-
"error_text": "Unable to download artifact",
100-
"ticket": 158401
101-
},
10290
{
10391
"error_text": "Failure when receiving data from the peer",
10492
"ticket": 159323
@@ -162,5 +150,33 @@
162150
{
163151
"error_text": "urllib3.exceptions.IncompleteRead",
164152
"ticket": 173184
153+
},
154+
{
155+
"error_text": "Error from intermediary with HTTP status code 403",
156+
"ticket": 181450
157+
},
158+
{
159+
"error_text": "getaddrinfo EAI_AGAIN",
160+
"ticket": 178917
161+
},
162+
{
163+
"error_text": "terminal prompts disabled",
164+
"ticket": 181095
165+
},
166+
{
167+
"error_text": "HTTP 500 curl 22 The requested URL returned error: 500",
168+
"ticket": 181530
169+
},
170+
{
171+
"error_text": "Unable to make request: ECONNREFUSED",
172+
"ticket": 158401
173+
},
174+
{
175+
"error_text": "Unable to make request: ECONNRESET",
176+
"ticket": 158401
177+
},
178+
{
179+
"error_text": "Failed to FinalizeArtifact: Failed to make request after 5 attempts: Unexpected token",
180+
"ticket": 181539
165181
}
166182
]

.github/workflows/workflow_rerunner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,6 @@ jobs:
108108
109109
# Need to get a run id with successful status for log analyzing
110110
# cannot lock a run id as logs get deleted after some time
111-
run_id=$(python3 -c "from github import Github, Auth; import os; github=Github(auth=Auth.Token(token=os.environ.get('GITHUB_TOKEN'))); repo = github.get_repo('${GITHUB_REPOSITORY}'); run_id = repo.get_workflow_runs(status='success')[0].id; print(run_id)")
111+
run_id=$(python3 -c "from github import Github, Auth; import os; from datetime import datetime, timedelta, timezone; github=Github(auth=Auth.Token(token=os.environ.get('GITHUB_TOKEN'))); repo = github.get_repo('${GITHUB_REPOSITORY}'); cutoff_date=(datetime.now(timezone.utc)-timedelta(days=14)).date().isoformat(); runs=repo.get_workflow_runs(status='success', created=f'>={cutoff_date}'); print(runs[0].id)")
112112
113113
python3 rerunner.py --repository-name ${GITHUB_REPOSITORY} --run-id $run_id --rerunner-run-id ${{ github.run_id }} --dry-run

cmake/features.cmake

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ else()
117117
endif()
118118

119119
ov_dependent_option (ENABLE_TBBBIND_2_5 "Enable TBBBind_2_5 static usage in OpenVINO runtime" ${ENABLE_TBBBIND_2_5_DEFAULT} "THREADING MATCHES TBB; NOT APPLE" OFF)
120-
ov_dependent_option (ENABLE_TBB_RELEASE_ONLY "Only Release TBB libraries are linked to the OpenVINO Runtime binaries" ON "THREADING MATCHES TBB;LINUX" OFF)
121120

122121
ov_option (ENABLE_MULTI "Enables MULTI Device Plugin" ON)
123122
ov_option (ENABLE_AUTO "Enables AUTO Device Plugin" ON)
@@ -144,7 +143,6 @@ ov_option(ENABLE_OV_PADDLE_FRONTEND "Enable PaddlePaddle FrontEnd" ON)
144143
ov_option(ENABLE_OV_IR_FRONTEND "Enable IR FrontEnd" ON)
145144
ov_option(ENABLE_OV_PYTORCH_FRONTEND "Enable PyTorch FrontEnd" ON)
146145
ov_option(ENABLE_OV_JAX_FRONTEND "Enable JAX FrontEnd" ON)
147-
ov_option(ENABLE_OV_IR_FRONTEND "Enable IR FrontEnd" ON)
148146
ov_option(ENABLE_OV_TF_FRONTEND "Enable TensorFlow FrontEnd" ON)
149147
ov_option(ENABLE_OV_TF_LITE_FRONTEND "Enable TensorFlow Lite FrontEnd" ON)
150148

@@ -224,10 +222,6 @@ if(ENABLE_OPENVINO_DEBUG)
224222
add_definitions(-DENABLE_OPENVINO_DEBUG)
225223
endif()
226224

227-
if (ENABLE_PROFILING_RAW)
228-
add_definitions(-DENABLE_PROFILING_RAW=1)
229-
endif()
230-
231225
if (ENABLE_SNIPPETS_DEBUG_CAPS)
232226
add_definitions(-DSNIPPETS_DEBUG_CAPS)
233227
endif()

src/bindings/js/node/include/core_wrap.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ struct TsfnContextPath {
128128
Napi::Promise::Deferred deferred;
129129
Napi::ThreadSafeFunction tsfn;
130130

131-
std::string _model;
131+
std::filesystem::path _model;
132132
std::string _device;
133133
ov::CompiledModel _compiled_model;
134134
std::map<std::string, ov::Any> _config = {};

src/bindings/js/node/include/helper.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#pragma once
55
#include <napi.h>
66

7+
#include <filesystem>
78
#include <unordered_set>
89
#include <variant>
910

@@ -70,6 +71,10 @@ template <>
7071
ov::preprocess::ResizeAlgorithm js_to_cpp<ov::preprocess::ResizeAlgorithm>(const Napi::CallbackInfo& info,
7172
const size_t idx);
7273

74+
/** @brief A template specialization for TargetType std::filesystem::path */
75+
template <>
76+
std::filesystem::path js_to_cpp<std::filesystem::path>(const Napi::CallbackInfo& info, const size_t idx);
77+
7378
/** @brief A template specialization for TargetType ov::Any */
7479
template <>
7580
ov::Any js_to_cpp<ov::Any>(const Napi::Env& env, const Napi::Value& value);

src/bindings/js/node/include/read_model_args.hpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (C) 2018-2026 Intel Corporation
2+
// SPDX-License-Identifier: Apache-2.0
3+
//
4+
15
#pragma once
26

37
#include <napi.h>
@@ -10,8 +14,8 @@
1014
* @brief This struct retrieves data from Napi::CallbackInfo.
1115
*/
1216
struct ReadModelArgs {
13-
std::string model_path;
14-
std::string bin_path;
17+
std::filesystem::path model_path;
18+
std::filesystem::path bin_path;
1519
std::string model_str;
1620
ov::Tensor weight_tensor;
1721

@@ -20,10 +24,10 @@ struct ReadModelArgs {
2024
std::vector<std::string> allowed_signatures;
2125

2226
if (ov::js::validate<Napi::String>(info, allowed_signatures)) {
23-
model_path = info[0].ToString();
27+
model_path = js_to_cpp<std::filesystem::path>(info, 0);
2428
} else if (ov::js::validate<Napi::String, Napi::String>(info, allowed_signatures)) {
25-
model_path = info[0].ToString();
26-
bin_path = info[1].ToString();
29+
model_path = js_to_cpp<std::filesystem::path>(info, 0);
30+
bin_path = js_to_cpp<std::filesystem::path>(info, 1);
2731
} else if (ov::js::validate<Napi::Buffer<uint8_t>>(info, allowed_signatures)) {
2832
model_str = buffer_to_string(info[0]);
2933
weight_tensor = ov::Tensor(ov::element::Type_t::u8, {0});

src/bindings/js/node/src/addon.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ Napi::Value save_model_sync(const Napi::CallbackInfo& info) {
3838
if (ov::js::validate<ModelWrap, Napi::String>(info, allowed_signatures)) {
3939
const auto& model = info[0].ToObject();
4040
const auto m = Napi::ObjectWrap<ModelWrap>::Unwrap(model);
41-
const auto path = js_to_cpp<std::string>(info, 1);
41+
const auto path = js_to_cpp<std::filesystem::path>(info, 1);
4242
ov::save_model(m->get_model(), path);
4343
} else if (ov::js::validate<ModelWrap, Napi::String, Napi::Boolean>(info, allowed_signatures)) {
4444
const auto& model = info[0].ToObject();
4545
const auto m = Napi::ObjectWrap<ModelWrap>::Unwrap(model);
46-
const auto path = js_to_cpp<std::string>(info, 1);
46+
const auto path = js_to_cpp<std::filesystem::path>(info, 1);
4747
const auto compress_to_fp16 = info[2].ToBoolean();
4848
ov::save_model(m->get_model(), path, compress_to_fp16);
4949
} else {

src/bindings/js/node/src/core_wrap.cpp

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ Napi::Value CoreWrap::read_model_sync(const Napi::CallbackInfo& info) {
6969
std::shared_ptr<ov::Model> model;
7070

7171
if (ov::js::validate<Napi::String, Napi::String>(info, allowed_signatures)) {
72-
model = _core.read_model(info[0].ToString(), info[1].ToString());
72+
model =
73+
_core.read_model(js_to_cpp<std::filesystem::path>(info, 0), js_to_cpp<std::filesystem::path>(info, 1));
7374
} else if (ov::js::validate<Napi::Buffer<uint8_t>, Napi::Buffer<uint8_t>>(info, allowed_signatures)) {
7475
std::string model_str = buffer_to_string(info[0]);
7576

@@ -87,7 +88,7 @@ Napi::Value CoreWrap::read_model_sync(const Napi::CallbackInfo& info) {
8788

8889
model = _core.read_model(model_str, weight_tensor);
8990
} else if (ov::js::validate<Napi::String>(info, allowed_signatures)) {
90-
model = _core.read_model(info[0].ToString());
91+
model = _core.read_model(js_to_cpp<std::filesystem::path>(info, 0));
9192
} else if (ov::js::validate<Napi::String, TensorWrap>(info, allowed_signatures)) {
9293
model = _core.read_model(info[0].ToString(), cast_to_tensor(info, 1));
9394
} else {
@@ -131,13 +132,6 @@ Napi::Value CoreWrap::compile_model_sync(const Napi::CallbackInfo& info,
131132
}
132133
}
133134

134-
Napi::Value CoreWrap::compile_model_sync(const Napi::CallbackInfo& info,
135-
const Napi::String& model_path,
136-
const Napi::String& device) {
137-
const auto& compiled_model = _core.compile_model(model_path, device);
138-
return CompiledModelWrap::wrap(info.Env(), compiled_model);
139-
}
140-
141135
Napi::Value CoreWrap::compile_model_sync(const Napi::CallbackInfo& info,
142136
const Napi::Object& model_obj,
143137
const Napi::String& device,
@@ -147,26 +141,22 @@ Napi::Value CoreWrap::compile_model_sync(const Napi::CallbackInfo& info,
147141
return CompiledModelWrap::wrap(info.Env(), compiled_model);
148142
}
149143

150-
Napi::Value CoreWrap::compile_model_sync(const Napi::CallbackInfo& info,
151-
const Napi::String& model_path,
152-
const Napi::String& device,
153-
const std::map<std::string, ov::Any>& config) {
154-
const auto& compiled_model = _core.compile_model(model_path, device, config);
155-
return CompiledModelWrap::wrap(info.Env(), compiled_model);
156-
}
157-
158144
Napi::Value CoreWrap::compile_model_sync_dispatch(const Napi::CallbackInfo& info) {
159145
std::vector<std::string> allowed_signatures;
160146

161147
try {
162148
if (ov::js::validate<Napi::String, Napi::String>(info, allowed_signatures)) {
163-
return compile_model_sync(info, info[0].ToString(), info[1].ToString());
149+
const auto& compiled_model =
150+
_core.compile_model(js_to_cpp<std::filesystem::path>(info, 0), info[1].ToString());
151+
return CompiledModelWrap::wrap(info.Env(), compiled_model);
164152
} else if (ov::js::validate<ModelWrap, Napi::String>(info, allowed_signatures)) {
165153
return compile_model_sync(info, info[0].ToObject(), info[1].ToString());
166154
} else if (ov::js::validate<Napi::String, Napi::String, Napi::Object>(info, allowed_signatures)) {
167155
const auto& config = js_to_cpp<std::map<std::string, ov::Any>>(info, 2);
168156

169-
return compile_model_sync(info, info[0].ToString(), info[1].ToString(), config);
157+
const auto& compiled_model =
158+
_core.compile_model(js_to_cpp<std::filesystem::path>(info, 0), info[1].ToString(), config);
159+
return CompiledModelWrap::wrap(info.Env(), compiled_model);
170160
} else if (ov::js::validate<ModelWrap, Napi::String, Napi::Object>(info, allowed_signatures)) {
171161
const auto& config = js_to_cpp<std::map<std::string, ov::Any>>(info, 2);
172162

@@ -244,7 +234,7 @@ Napi::Value CoreWrap::compile_model_async(const Napi::CallbackInfo& info) {
244234
return context_data->deferred.Promise();
245235
} else if (info[0].IsString() && info[1].IsString()) {
246236
auto context_data = new TsfnContextPath(env);
247-
context_data->_model = info[0].ToString();
237+
context_data->_model = js_to_cpp<std::filesystem::path>(info, 0);
248238
context_data->_device = info[1].ToString();
249239

250240
if (info.Length() == 3) {
@@ -473,8 +463,7 @@ void CoreWrap::add_extension(const Napi::CallbackInfo& info) {
473463
if (!info[0].IsString())
474464
OPENVINO_THROW("addExtension method applies one argument of string type");
475465

476-
std::string library_path = info[0].ToString();
477-
_core.add_extension(library_path);
466+
_core.add_extension(js_to_cpp<std::filesystem::path>(info, 0));
478467
} catch (std::runtime_error& err) {
479468
reportError(info.Env(), err.what());
480469
}

src/bindings/js/node/src/helper.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,13 @@ ov::preprocess::ResizeAlgorithm js_to_cpp<ov::preprocess::ResizeAlgorithm>(const
151151
}
152152
}
153153

154+
template <>
155+
std::filesystem::path js_to_cpp<std::filesystem::path>(const Napi::CallbackInfo& info, const size_t idx) {
156+
const auto& path = info[idx];
157+
OPENVINO_ASSERT(path.IsString(), "Passed argument must be of type String.");
158+
return std::filesystem::path(path.ToString().Utf8Value());
159+
}
160+
154161
template <>
155162
ov::Any js_to_cpp<ov::Any>(const Napi::Env& env, const Napi::Value& value) {
156163
if (value.IsString()) {

src/common/low_precision_transformations/src/low_precision.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ bool LowPrecision::run_on_model(const std::shared_ptr<ov::Model>& m) {
304304

305305
REGISTER_PASS(manager, FoldFakeQuantizeTransformation, params)
306306
REGISTER_PASS(manager, ConstantFolding)
307+
REGISTER_PASS(manager, Validate)
307308

308309
manager.run_passes(m);
309310
return false;

0 commit comments

Comments
 (0)