Skip to content

Commit

Permalink
1.16.3 patch release (#18491)
Browse files Browse the repository at this point in the history
Cherry-pick the following PRs:

#18467 
#17797
#18341
#18456
  • Loading branch information
snnn authored Nov 18, 2023
1 parent 0c5b95f commit de0e87e
Show file tree
Hide file tree
Showing 90 changed files with 230 additions and 226 deletions.
27 changes: 0 additions & 27 deletions .lintrunner.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,33 +97,6 @@ init_command = [
]
is_formatter = true

[[linter]]
code = 'PYLINT'
include_patterns = [
# TODO: Opt in to pylint by adding paths here
]
exclude_patterns = [
]
command = [
'python',
'-m',
'lintrunner_adapters',
'run',
'pylint_linter',
'--rcfile=pyproject.toml',
'--',
'@{{PATHSFILE}}'
]
init_command = [
'python',
'-m',
'lintrunner_adapters',
'run',
'pip_init',
'--dry-run={{DRYRUN}}',
'--requirement=requirements-lintrunner.txt',
]

[[linter]]
code = 'RUSTFMT'
include_patterns = ['**/*.rs']
Expand Down
2 changes: 1 addition & 1 deletion VERSION_NUMBER
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.16.2
1.16.3
5 changes: 5 additions & 0 deletions docs/python/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ For more information on ONNX Runtime, please see `aka.ms/onnxruntime <https://ak
Changes
-------

1.16.3
^^^^^^

Release Notes : https://github.com/Microsoft/onnxruntime/releases/tag/v1.16.3

1.16.2
^^^^^^

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ class ThreadPoolProfiler {
int num_threads_;
#ifdef _MSC_VER
#pragma warning(push)
// C4324: structure was padded due to alignment specifier
// C4324: structure was padded due to alignment specifier
#pragma warning(disable : 4324)
#endif // _MSC_VER
struct ORT_ALIGN_TO_AVOID_FALSE_SHARING ChildThreadStat {
Expand Down
2 changes: 1 addition & 1 deletion js/common/lib/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
// This file is generated by /js/scripts/update-version.ts
// Do not modify file content manually.

export const version = '1.16.2';
export const version = '1.16.3';
4 changes: 2 additions & 2 deletions js/common/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"license": "MIT",
"type": "module",
"name": "onnxruntime-common",
"version": "1.16.2",
"version": "1.16.3",
"repository": {
"url": "https://github.com/Microsoft/onnxruntime.git",
"type": "git"
Expand Down
2 changes: 1 addition & 1 deletion js/node/lib/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
// This file is generated by /js/scripts/update-version.ts
// Do not modify file content manually.

export const version = '1.16.2';
export const version = '1.16.3';
6 changes: 3 additions & 3 deletions js/node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
3
]
},
"version": "1.16.2",
"version": "1.16.3",
"dependencies": {
"onnxruntime-common": "file:../common"
},
Expand Down
2 changes: 1 addition & 1 deletion js/react_native/lib/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
// This file is generated by /js/scripts/update-version.ts
// Do not modify file content manually.

export const version = '1.16.2';
export const version = '1.16.3';
2 changes: 1 addition & 1 deletion js/react_native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"registry": "https://registry.npmjs.org/"
},
"source": "lib/index",
"version": "1.16.2",
"version": "1.16.3",
"main": "dist/commonjs/index",
"homepage": "https://github.com/microsoft/onnxruntime/blob/main/js/react_native/README.md",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion js/react_native/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5188,7 +5188,7 @@ onetime@^5.1.0, onetime@^5.1.2:
mimic-fn "^2.1.0"

"onnxruntime-common@file:../common":
version "1.16.2"
version "1.16.3"

open@^6.2.0:
version "6.4.0"
Expand Down
2 changes: 1 addition & 1 deletion js/web/lib/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
// This file is generated by /js/scripts/update-version.ts
// Do not modify file content manually.

export const version = '1.16.2';
export const version = '1.16.3';
6 changes: 3 additions & 3 deletions js/web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "git"
},
"author": "fs-eire",
"version": "1.16.2",
"version": "1.16.3",
"jsdelivr": "dist/ort.min.js",
"dependencies": {
"flatbuffers": "^1.12.0",
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
For more information on ONNX Runtime, please see `aka.ms/onnxruntime <https://aka.ms/onnxruntime/>`_
or the `Github project <https://github.com/microsoft/onnxruntime/>`_.
"""
__version__ = "1.16.2"
__version__ = "1.16.3"
__author__ = "Microsoft"

# we need to do device version validation (for example to check Cuda version for an onnxruntime-training package).
Expand Down
3 changes: 1 addition & 2 deletions onnxruntime/core/framework/session_state_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,10 @@ common::Status SaveInputOutputNamesToNodeMapping(const onnxruntime::GraphViewer&
// utils::CopyOneInputAcrossDevices is happy.

auto& input_map = session_state.GetInputNodeInfoMap();
auto end_map = input_map.cend();

for (const auto& graph_input : graph_inputs) {
const auto& name = graph_input->Name();
if (input_map.find(name) == end_map) {
if (input_map.find(name) == input_map.cend()) {
// dummy entry for an input that we didn't find a use of in the graph. log it in case that's a bug.
// utils::CopyOneInputAcrossDevices will use the input OrtValue as is given we don't believe it's used anywhere.
LOGS(session_state.Logger(), INFO) << (graph.IsSubgraph() ? "Subgraph" : "Graph") << " input with name "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,11 @@ TensorrtExecutionProvider::~TensorrtExecutionProvider() {
}
}

if (external_stream_) {
ORT_IGNORE_RETURN_VALUE(CUBLAS_CALL(cublasDestroy(external_cublas_handle_)));
ORT_IGNORE_RETURN_VALUE(CUDNN_CALL(cudnnDestroy(external_cudnn_handle_)));
}

if (!external_stream_ && stream_) {
ORT_IGNORE_RETURN_VALUE(CUDA_CALL(cudaStreamDestroy(stream_)));
}
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/core/session/onnxruntime_c_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2744,7 +2744,7 @@ static_assert(offsetof(OrtApi, GetBuildInfoString) / sizeof(void*) == 254, "Size
static_assert(offsetof(OrtApi, KernelContext_GetResource) / sizeof(void*) == 265, "Size of version 16 API cannot change");

// So that nobody forgets to finish an API version, this check will serve as a reminder:
static_assert(std::string_view(ORT_VERSION) == "1.16.2",
static_assert(std::string_view(ORT_VERSION) == "1.16.3",
"ORT_Version change detected, please follow below steps to ensure OrtApi is updated properly");
// 1. Update the hardcoded version string in above static_assert to silence it
// 2. If there were any APIs added to ort_api_1_to_16 above:
Expand Down
4 changes: 2 additions & 2 deletions onnxruntime/python/backend/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def is_opset_supported(cls, model):
error_message = (
"Skipping this test as only released onnx opsets are supported."
"To run this test set env variable ALLOW_RELEASED_ONNX_OPSET_ONLY to 0."
" Got Domain '{}' version '{}'.".format(domain, opset.version)
f" Got Domain '{domain}' version '{opset.version}'."
)
return False, error_message
except AttributeError:
Expand All @@ -74,7 +74,7 @@ def is_opset_supported(cls, model):
error_message = (
"Skipping this test as only released onnx opsets are supported."
"To run this test set env variable ALLOW_RELEASED_ONNX_OPSET_ONLY to 0."
" Got Domain '{}' version '{}'.".format(domain, opset.version)
f" Got Domain '{domain}' version '{opset.version}'."
)
return False, error_message
return True, ""
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/python/tools/onnxruntime_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def generate_feeds(sess, symbolic_dims: dict | None = None):
if not dim:
# unknown dim
shape.append(1)
elif type(dim) == str:
elif isinstance(dim, str):
# symbolic dim. see if we have a value otherwise use 1
if dim in symbolic_dims:
shape.append(int(symbolic_dims[dim]))
Expand Down
4 changes: 2 additions & 2 deletions onnxruntime/python/tools/profile_explorer/profile_explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ def _shape_to_string(shape):
for dict_obj in shape:
if len(dict_obj) > 1:
raise ValueError("Unhandled type in _shape_to_string()")
key = list(dict_obj.keys())[0]
value = list(dict_obj.values())[0]
key = next(iter(dict_obj.keys()))
value = next(iter(dict_obj.values()))
if len(res) != 0:
res += ","
res += f'{key}({"x".join(str(v) for v in value)})'
Expand Down
4 changes: 2 additions & 2 deletions onnxruntime/python/tools/quantization/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,9 @@ def compute_data(self) -> TensorsData:
else:
min_value_array = min(merged_added_output_dict[added_output_names[i]])
max_value_array = max(merged_added_output_dict[added_output_names[i + 1]])
if type(min_value_array) == int or min_value_array.size > 0:
if isinstance(min_value_array, int) or min_value_array.size > 0:
min_value = float(min_value_array)
if type(max_value_array) == int or max_value_array.size > 0:
if isinstance(max_value_array, int) or max_value_array.size > 0:
max_value = float(max_value_array)

if self.symmetric:
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/python/tools/quantization/onnx_quantizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ def _get_quantization_params(self, param_name, use_scale=None, use_zeropoint=Non
if params is None or len(params) != 2:
raise ValueError(
"Quantization parameters should contain zero point and scale. "
"Specified values for output {}: {}".format(param_name, params)
f"Specified values for output {param_name}: {params}"
)

zero_point_values = [params["zero_point"]]
Expand Down
Loading

0 comments on commit de0e87e

Please sign in to comment.