From e5c2e5084948cacc1d58d6d9b38ae4da85d4ce92 Mon Sep 17 00:00:00 2001
From: Akshay Sonawane <111780983+apsonawane@users.noreply.github.com>
Date: Thu, 17 Oct 2024 12:32:35 -0700
Subject: [PATCH] bumps up version in main from 1.20 -> 1.21 (#22482)
Bump up version in main from 1.20.0 to 1.21.0 since the release branch
has been cut.
---
VERSION_NUMBER | 2 +-
.../Training/NativeTrainingMethods.shared.cs | 2 +-
docs/python/README.rst | 5 +++++
include/onnxruntime/core/session/onnxruntime_c_api.h | 2 +-
js/common/lib/version.ts | 2 +-
js/common/package-lock.json | 4 ++--
js/common/package.json | 2 +-
js/node/lib/version.ts | 2 +-
js/node/package-lock.json | 6 +++---
js/node/package.json | 2 +-
js/react_native/lib/version.ts | 2 +-
js/react_native/package.json | 2 +-
js/react_native/yarn.lock | 2 +-
js/web/lib/version.ts | 2 +-
js/web/package-lock.json | 6 +++---
js/web/package.json | 2 +-
onnxruntime/__init__.py | 2 +-
onnxruntime/core/session/onnxruntime_c_api.cc | 8 ++++----
18 files changed, 30 insertions(+), 25 deletions(-)
diff --git a/VERSION_NUMBER b/VERSION_NUMBER
index 3989355915568..3500250a4b05b 100644
--- a/VERSION_NUMBER
+++ b/VERSION_NUMBER
@@ -1 +1 @@
-1.20.0
+1.21.0
diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/Training/NativeTrainingMethods.shared.cs b/csharp/src/Microsoft.ML.OnnxRuntime/Training/NativeTrainingMethods.shared.cs
index 9b1df9357dc88..b4067806c5f93 100644
--- a/csharp/src/Microsoft.ML.OnnxRuntime/Training/NativeTrainingMethods.shared.cs
+++ b/csharp/src/Microsoft.ML.OnnxRuntime/Training/NativeTrainingMethods.shared.cs
@@ -76,7 +76,7 @@ static NativeTrainingMethods()
DOrtGetApi OrtGetApi = (DOrtGetApi)Marshal.GetDelegateForFunctionPointer(NativeMethods.OrtGetApiBase().GetApi, typeof(DOrtGetApi));
#endif
- const uint ORT_API_VERSION = 20;
+ const uint ORT_API_VERSION = 21;
#if NETSTANDARD2_0
IntPtr ortApiPtr = OrtGetApi(ORT_API_VERSION);
api_ = (OrtApi)Marshal.PtrToStructure(ortApiPtr, typeof(OrtApi));
diff --git a/docs/python/README.rst b/docs/python/README.rst
index 5a45bf6cef8ed..cce966f7d7d0c 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.20.0"
+__version__ = "1.21.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 2600104bde7a2..8280270a768f0 100644
--- a/onnxruntime/core/session/onnxruntime_c_api.cc
+++ b/onnxruntime/core/session/onnxruntime_c_api.cc
@@ -2469,7 +2469,7 @@ Second example, if we wanted to add and remove some members, we'd do this:
In GetApi we now make it return ort_api_3 for version 3.
*/
-static constexpr OrtApi ort_api_1_to_20 = {
+static constexpr OrtApi ort_api_1_to_21 = {
// NOTE: The ordering of these fields MUST not change after that version has shipped since existing binaries depend on this ordering.
// Shipped as version 1 - DO NOT MODIFY (see above text for more information)
@@ -2842,16 +2842,16 @@ static_assert(offsetof(OrtApi, SessionOptionsAppendExecutionProvider_OpenVINO_V2
static_assert(offsetof(OrtApi, AddExternalInitializersFromFilesInMemory) / sizeof(void*) == 279, "Size of version 18 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.20.0",
+static_assert(std::string_view(ORT_VERSION) == "1.21.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_20 above:
+// 2. If there were any APIs added to ort_api_1_to_21 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
ORT_API(const OrtApi*, OrtApis::GetApi, uint32_t version) {
if (version >= 1 && version <= ORT_API_VERSION)
- return &ort_api_1_to_20;
+ return &ort_api_1_to_21;
fprintf(stderr,
"The requested API version [%u] is not available, only API versions [1, %u] are supported in this build."