From d9c744ed9a137f5ff2ff046edd20221ae6f7939e Mon Sep 17 00:00:00 2001 From: Ye Wang <52801275+wangyems@users.noreply.github.com> Date: Thu, 26 Jan 2023 11:14:22 -0800 Subject: [PATCH 1/4] Fix a bug in t5 beamsearch with half precision (#14436) the CreateEncoderInputs functor was passed to the ctor as nullptr when type is MLFloat16. ### Description ### Motivation and Context --- onnxruntime/contrib_ops/cpu/transformers/beam_search.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/contrib_ops/cpu/transformers/beam_search.cc b/onnxruntime/contrib_ops/cpu/transformers/beam_search.cc index 8744b0244e1a2..c839bb4245c21 100644 --- a/onnxruntime/contrib_ops/cpu/transformers/beam_search.cc +++ b/onnxruntime/contrib_ops/cpu/transformers/beam_search.cc @@ -245,7 +245,7 @@ Status BeamSearch::Compute(OpKernelContext* ctx) const { init_beam_state_fp16_func_, device_copy_func_, device_copy_int32_func_, - create_encoder_inputs_func_, + create_encoder_inputs_func_ ? create_encoder_inputs_func_ : GenerationCpuDeviceHelper::CreateEncoderInputs, update_decoder_feeds_fp16_func_, expand_buffer_int32_func_, expand_buffer_float_func_, From eacd829d230e7419594c3c06dfa82a084f50429f Mon Sep 17 00:00:00 2001 From: Rui Ren Date: Thu, 26 Jan 2023 12:33:47 -0800 Subject: [PATCH 2/4] Bump ORT version number (#14226) ### Description Bump ort version after the creation of release candidate of 1.14 Co-authored-by: ruiren --- VERSION_NUMBER | 2 +- docs/python/README.rst | 5 +++++ js/common/package-lock.json | 4 ++-- js/common/package.json | 2 +- js/node/package-lock.json | 6 +++--- js/node/package.json | 2 +- js/react_native/package.json | 2 +- js/react_native/yarn.lock | 2 +- js/web/package-lock.json | 6 +++--- js/web/package.json | 2 +- onnxruntime/__init__.py | 2 +- onnxruntime/core/session/onnxruntime_c_api.cc | 8 ++++++-- package/rpm/onnxruntime.spec | 2 +- 13 files changed, 27 insertions(+), 18 deletions(-) diff --git a/VERSION_NUMBER b/VERSION_NUMBER index 850e742404bba..141f2e805bebd 100644 --- a/VERSION_NUMBER +++ b/VERSION_NUMBER @@ -1 +1 @@ -1.14.0 +1.15.0 diff --git a/docs/python/README.rst b/docs/python/README.rst index b9c2bf995ac33..f5f162b1d42eb 100644 --- a/docs/python/README.rst +++ b/docs/python/README.rst @@ -8,6 +8,11 @@ For more information on ONNX Runtime, please see `aka.ms/onnxruntime `_ or the `Github project `_. """ -__version__ = "1.14.0" +__version__ = "1.15.0" __author__ = "Microsoft" # we need to do device version validation (for example to check Cuda version for an onnxruntime-training package). diff --git a/onnxruntime/core/session/onnxruntime_c_api.cc b/onnxruntime/core/session/onnxruntime_c_api.cc index 265823b09a913..bbb629216f821 100644 --- a/onnxruntime/core/session/onnxruntime_c_api.cc +++ b/onnxruntime/core/session/onnxruntime_c_api.cc @@ -2660,6 +2660,10 @@ static constexpr OrtApi ort_api_1_to_14 = { &OrtApis::KernelInfoGetAttribute_tensor, &OrtApis::HasSessionConfigEntry, &OrtApis::GetSessionConfigEntry, + // End of Version 14 - DO NOT MODIFY ABOVE (see above text for more information) + + // Start of Version 15 API in progress, safe to modify/rename/rearrange until we ship + }; // Asserts to do a some checks to ensure older Versions of the OrtApi never change (will detect an addition or deletion but not if they cancel out each other) @@ -2681,10 +2685,10 @@ static_assert(offsetof(OrtApi, ReleaseKernelInfo) / sizeof(void*) == 218, "Size static_assert(offsetof(OrtApi, ReleaseCANNProviderOptions) / sizeof(void*) == 224, "Size of version 13 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.14.0", +static_assert(std::string_view(ORT_VERSION) == "1.15.0", "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_14 above: +// 2. If there were any APIs added to ort_api_1_to_15 above: // a. Add the 'End of version #' markers (pattern above should be obvious) // b. Add a static_assert in the directly above list of version sizes to ensure nobody adds any more functions to the just shipped API version diff --git a/package/rpm/onnxruntime.spec b/package/rpm/onnxruntime.spec index f1625148fd2c1..d4efef8900432 100644 --- a/package/rpm/onnxruntime.spec +++ b/package/rpm/onnxruntime.spec @@ -1,5 +1,5 @@ Name: onnxruntime -Version: 1.14.0 +Version: 1.15.0 Release: 1%{?dist} Summary: onnxruntime From de11527d76d4613c53fbbe11188e9cf525f8b4b5 Mon Sep 17 00:00:00 2001 From: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Date: Thu, 26 Jan 2023 14:43:09 -0800 Subject: [PATCH 3/4] [js] fix js/web bundle (#14434) ### Description make sure "crypto" is not processed by webpack for browser configuration --- js/web/webpack.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/web/webpack.config.js b/js/web/webpack.config.js index 79de304ccd233..d69c6e3b94060 100644 --- a/js/web/webpack.config.js +++ b/js/web/webpack.config.js @@ -80,6 +80,7 @@ function buildConfig({ filename, format, target, mode, devtool, build_defs }) { "util": false, }, fallback: { + "crypto": false, "fs": false, "path": false, "util": false, From 4ef64f3681819924b93d9b844ab847d2eb4b4fad Mon Sep 17 00:00:00 2001 From: Wei-Sheng Chin Date: Thu, 26 Jan 2023 15:43:53 -0800 Subject: [PATCH 4/4] Fix warning c26409 (#14079) We should avoid using `new` and `delete` in C/C++ code whenever possible as suggested by VC compiler. --- .../test/testdata/custom_op_library/custom_op_library.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onnxruntime/test/testdata/custom_op_library/custom_op_library.cc b/onnxruntime/test/testdata/custom_op_library/custom_op_library.cc index d75379668b824..fcc1ea78926e3 100644 --- a/onnxruntime/test/testdata/custom_op_library/custom_op_library.cc +++ b/onnxruntime/test/testdata/custom_op_library/custom_op_library.cc @@ -73,7 +73,7 @@ struct KernelTwo { struct CustomOpOne : Ort::CustomOpBase { void* CreateKernel(const OrtApi& /* api */, const OrtKernelInfo* /* info */) const { - return new KernelOne(); + return std::make_unique().release(); }; const char* GetName() const { return "CustomOpOne"; }; @@ -92,7 +92,7 @@ struct CustomOpOne : Ort::CustomOpBase { struct CustomOpTwo : Ort::CustomOpBase { void* CreateKernel(const OrtApi& /* api */, const OrtKernelInfo* /* info */) const { - return new KernelTwo(); + return std::make_unique().release(); }; const char* GetName() const { return "CustomOpTwo"; };