mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-04 04:07:22 +00:00
Update to onnx 1.16.1 (#20702)
This commit is contained in:
parent
3dd6fcc089
commit
51bc53580d
14 changed files with 22 additions and 110 deletions
|
|
@ -26,7 +26,7 @@
|
|||
"component": {
|
||||
"type": "git",
|
||||
"git": {
|
||||
"commitHash": "990217f043af7222348ca8f0301e17fa7b841781",
|
||||
"commitHash": "595228d99e3977ac27cb79d5963adda262af99ad",
|
||||
"repositoryUrl": "https://github.com/onnx/onnx.git"
|
||||
},
|
||||
"comments": "git submodule at cmake/external/onnx"
|
||||
|
|
@ -216,7 +216,7 @@
|
|||
"component": {
|
||||
"type": "git",
|
||||
"git": {
|
||||
"commitHash": "eb43908b02a296ea0594432f06e9d3fac288d672",
|
||||
"commitHash": "06adf4461ac84035bee658c6cf5df39f7ab6071d",
|
||||
"repositoryUrl": "https://github.com/onnx/onnx-tensorrt.git"
|
||||
},
|
||||
"comments": "onnx_tensorrt"
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ microsoft_wil;https://github.com/microsoft/wil/archive/refs/tags/v1.0.230629.1.z
|
|||
mimalloc;https://github.com/microsoft/mimalloc/archive/refs/tags/v2.1.1.zip;d5ee7d34223d0567892db5179849939c8769dc41
|
||||
mp11;https://github.com/boostorg/mp11/archive/refs/tags/boost-1.82.0.zip;9bc9e01dffb64d9e0773b2e44d2f22c51aace063
|
||||
neural_speed;https://github.com/intel/neural-speed/archive/refs/tags/v0.3.zip;5ec64e3071edc7347ebd8a81679cf06e2bb9b851
|
||||
onnx;https://github.com/onnx/onnx/archive/refs/tags/v1.16.0.zip;a6d8b619459fb4657f8bec7d1c6d95ad6d4c069d
|
||||
onnx;https://github.com/onnx/onnx/archive/refs/tags/v1.16.1.zip;2eb9198bb352757d5ff13977cbe0634898e0837c
|
||||
#use the latest commit of 10.0-GA
|
||||
onnx_tensorrt;https://github.com/onnx/onnx-tensorrt/archive/06adf4461ac84035bee658c6cf5df39f7ab6071d.zip;46dceef659d75d276e7914a8057c2282269d5e7b
|
||||
protobuf;https://github.com/protocolbuffers/protobuf/archive/refs/tags/v21.12.zip;7cf2733949036c7d52fda017badcab093fe73bfa
|
||||
|
|
|
|||
2
cmake/external/onnx
vendored
2
cmake/external/onnx
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 990217f043af7222348ca8f0301e17fa7b841781
|
||||
Subproject commit 595228d99e3977ac27cb79d5963adda262af99ad
|
||||
|
|
@ -36,15 +36,15 @@ index b847798e..a6c31904 100644
|
|||
--- a/onnx/common/file_utils.h
|
||||
+++ b/onnx/common/file_utils.h
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
-#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -17,8 +16,7 @@ namespace ONNX_NAMESPACE {
|
||||
|
||||
|
||||
template <typename T>
|
||||
void LoadProtoFromPath(const std::string proto_path, T& proto) {
|
||||
- std::filesystem::path proto_u8_path = std::filesystem::u8path(proto_path);
|
||||
|
|
@ -53,42 +53,6 @@ index b847798e..a6c31904 100644
|
|||
if (!proto_stream.good()) {
|
||||
fail_check("Unable to open proto file: ", proto_path, ". Please check if it is a valid proto. ");
|
||||
}
|
||||
diff --git a/onnx/defs/quantization/defs.cc b/onnx/defs/quantization/defs.cc
|
||||
index 70b4a4db..98c11545 100644
|
||||
--- a/onnx/defs/quantization/defs.cc
|
||||
+++ b/onnx/defs/quantization/defs.cc
|
||||
@@ -200,6 +200,9 @@ ONNX_OPERATOR_SET_SCHEMA(
|
||||
.SetDoc(DequantizeLinear_ver21_doc)
|
||||
.TypeAndShapeInferenceFunction([](ONNX_NAMESPACE::InferenceContext& ctx) {
|
||||
propagateElemTypeFromInputToOutput(ctx, 1, 0);
|
||||
+ if (!hasInputShape(ctx, 0)) {
|
||||
+ return;
|
||||
+ }
|
||||
auto& input_shape = getInputShape(ctx, 0);
|
||||
updateOutputShape(ctx, 0, input_shape);
|
||||
}));
|
||||
diff --git a/onnx/defs/quantization/old.cc b/onnx/defs/quantization/old.cc
|
||||
index 3f2d6384..d2f7cfd8 100644
|
||||
--- a/onnx/defs/quantization/old.cc
|
||||
+++ b/onnx/defs/quantization/old.cc
|
||||
@@ -130,6 +130,9 @@ ONNX_OPERATOR_SET_SCHEMA(
|
||||
.SetDoc(DequantizeLinear_ver19_doc)
|
||||
.TypeAndShapeInferenceFunction([](ONNX_NAMESPACE::InferenceContext& ctx) {
|
||||
propagateElemTypeFromInputToOutput(ctx, 1, 0);
|
||||
+ if (!hasInputShape(ctx, 0)) {
|
||||
+ return;
|
||||
+ }
|
||||
auto& input_shape = getInputShape(ctx, 0);
|
||||
updateOutputShape(ctx, 0, input_shape);
|
||||
}));
|
||||
@@ -181,7 +184,6 @@ ONNX_OPERATOR_SET_SCHEMA(
|
||||
if (!hasInputShape(ctx, 0)) {
|
||||
return;
|
||||
}
|
||||
-
|
||||
auto& input_shape = getInputShape(ctx, 0);
|
||||
updateOutputShape(ctx, 0, input_shape);
|
||||
}));
|
||||
diff --git a/onnx/onnx_pb.h b/onnx/onnx_pb.h
|
||||
index 0aab3e26..398ac2d6 100644
|
||||
--- a/onnx/onnx_pb.h
|
||||
|
|
@ -96,7 +60,7 @@ index 0aab3e26..398ac2d6 100644
|
|||
@@ -47,10 +47,28 @@
|
||||
#define ONNX_API ONNX_IMPORT
|
||||
#endif
|
||||
|
||||
|
||||
+#if defined(__GNUC__)
|
||||
+#pragma GCC diagnostic push
|
||||
+
|
||||
|
|
@ -116,61 +80,9 @@ index 0aab3e26..398ac2d6 100644
|
|||
#else
|
||||
#include "onnx/onnx.pb.h"
|
||||
#endif
|
||||
|
||||
|
||||
+#if defined(__GNUC__)
|
||||
+#pragma GCC diagnostic pop
|
||||
+#endif
|
||||
+
|
||||
#endif // ! ONNX_ONNX_PB_H
|
||||
diff --git a/onnx/shape_inference/implementation.cc b/onnx/shape_inference/implementation.cc
|
||||
index fab1faf2..8723dcd4 100644
|
||||
--- a/onnx/shape_inference/implementation.cc
|
||||
+++ b/onnx/shape_inference/implementation.cc
|
||||
@@ -488,29 +488,29 @@ class ShapeInferenceImplBase {
|
||||
ProcessCall(n, *(iter->second), ctx);
|
||||
} else {
|
||||
has_unsupported_op = true;
|
||||
+ return;
|
||||
}
|
||||
} else {
|
||||
has_unsupported_op = true;
|
||||
+ return;
|
||||
}
|
||||
- if (!has_unsupported_op) {
|
||||
- for (int i = 0; i < n.output_size(); ++i) {
|
||||
- // skip type and shape propagation for missing optional outputs.
|
||||
- if (!n.output(i).empty())
|
||||
- UpdateType(n.output(i), ctx.getOutputType(i));
|
||||
- }
|
||||
- // Constant values are tracked to improve inference/checking for subsequent nodes.
|
||||
- ProcessConstant(n);
|
||||
- // If data-propagation is enabled, partial-evaluation (aka data-propagation) is performed
|
||||
- // to improve inference/checking for subsequent nodes.
|
||||
- if (options.enable_data_propagation && schema && schema->has_data_propagation_function()) {
|
||||
- if (generated_shape_data_by_name == nullptr) {
|
||||
- fail_shape_inference(
|
||||
- "Container for generated shape data cannot be nullptr when enable_data_propagation option is set.");
|
||||
- }
|
||||
- DataPropagationContextImpl data_propagation_ctx(
|
||||
- n, value_types_by_name, input_data_by_name, *generated_shape_data_by_name);
|
||||
- schema->GetDataPropagationFunction()(data_propagation_ctx);
|
||||
+ for (int i = 0; i < n.output_size(); ++i) {
|
||||
+ // skip type and shape propagation for missing optional outputs.
|
||||
+ if (!n.output(i).empty())
|
||||
+ UpdateType(n.output(i), ctx.getOutputType(i));
|
||||
+ }
|
||||
+ // Constant values are tracked to improve inference/checking for subsequent nodes.
|
||||
+ ProcessConstant(n);
|
||||
+ // If data-propagation is enabled, partial-evaluation (aka data-propagation) is performed
|
||||
+ // to improve inference/checking for subsequent nodes.
|
||||
+ if (options.enable_data_propagation && schema && schema->has_data_propagation_function()) {
|
||||
+ if (generated_shape_data_by_name == nullptr) {
|
||||
+ fail_shape_inference(
|
||||
+ "Container for generated shape data cannot be nullptr when enable_data_propagation option is set.");
|
||||
}
|
||||
+ DataPropagationContextImpl data_propagation_ctx(
|
||||
+ n, value_types_by_name, input_data_by_name, *generated_shape_data_by_name);
|
||||
+ schema->GetDataPropagationFunction()(data_propagation_ctx);
|
||||
}
|
||||
}
|
||||
ONNX_CATCH(const ONNX_NAMESPACE::InferenceError& ex) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
optimum>=1.14.1
|
||||
transformers>=4.33.2,<= 4.37.2
|
||||
torch>=2.2.0
|
||||
onnx==1.16.0
|
||||
onnx==1.16.1
|
||||
datasets>=2.8.0
|
||||
protobuf==3.20.2
|
||||
psutil
|
||||
psutil
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
onnx==1.16.0
|
||||
onnx==1.16.1
|
||||
transformers>=4.36.2
|
||||
onnxscript>=0.1.0.dev20240126
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ soundfile
|
|||
librosa
|
||||
optimum
|
||||
onnxruntime-extensions>=0.9.0
|
||||
onnx==1.16.0
|
||||
onnx==1.16.1
|
||||
protobuf==3.20.2
|
||||
numpy==1.23.3
|
||||
psutil
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
onnx==1.16.0
|
||||
onnx==1.16.1
|
||||
pytest
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ steps:
|
|||
packageType: upack
|
||||
feed: '/7424c8e4-5c62-490e-95c4-79446f31017c'
|
||||
definition: '517c4f6f-5437-4392-a70d-4f15ec5be2f0'
|
||||
version: 1.0.155
|
||||
version: 1.0.156
|
||||
downloadPath: $(Build.BinariesDirectory)/deps
|
||||
|
||||
# The private ADO project
|
||||
|
|
@ -22,7 +22,7 @@ steps:
|
|||
packageType: upack
|
||||
feed: '/4c7631f5-24c0-4307-8822-1aa8f180c325'
|
||||
definition: 'fd9dd5ad-b73e-4678-890e-edcf680dbc1a'
|
||||
version: 1.0.155
|
||||
version: 1.0.156
|
||||
downloadPath: $(Build.BinariesDirectory)/deps
|
||||
|
||||
# You can add more ADO accounts at here.
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ mypy
|
|||
pytest
|
||||
setuptools>=68.2.2
|
||||
wheel
|
||||
onnx==1.16.0
|
||||
onnx==1.16.1
|
||||
protobuf==4.21.12
|
||||
sympy==1.12
|
||||
flatbuffers
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ mypy
|
|||
pytest
|
||||
setuptools>=68.2.2
|
||||
wheel
|
||||
onnx==1.16.0
|
||||
onnx==1.16.1
|
||||
protobuf==4.21.12
|
||||
sympy==1.12
|
||||
flatbuffers
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ mypy
|
|||
pytest
|
||||
setuptools>=68.2.2
|
||||
wheel
|
||||
onnx==1.16.0
|
||||
onnx==1.16.1
|
||||
protobuf==4.21.12
|
||||
sympy==1.12
|
||||
flatbuffers
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ mypy
|
|||
pytest
|
||||
setuptools>=68.2.2
|
||||
wheel
|
||||
onnx==1.16.0
|
||||
onnx==1.16.1
|
||||
protobuf==4.21.12
|
||||
sympy==1.12
|
||||
flatbuffers
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ mypy
|
|||
pytest
|
||||
setuptools==69.0.3
|
||||
wheel==0.42.0
|
||||
onnx==1.16.0
|
||||
onnx==1.16.1
|
||||
argparse
|
||||
sympy==1.12
|
||||
flatbuffers
|
||||
|
|
|
|||
Loading…
Reference in a new issue