Skip to content

Commit e6560ec

Browse files
author
Gopalakrishnan Nallasamy
committed
Correct ORT version metadata to 1.27.0
1 parent ddefb5a commit e6560ec

4 files changed

Lines changed: 28 additions & 24 deletions

File tree

VERSION_NUMBER

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.28.0
1+
1.27.0

include/onnxruntime/core/session/onnxruntime_c_api.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*
3939
* This value is used by some API functions to behave as this version of the header expects.
4040
*/
41-
#define ORT_API_VERSION 28
41+
#define ORT_API_VERSION 27
4242

4343
#ifdef __cplusplus
4444
extern "C" {
@@ -7535,6 +7535,11 @@ struct OrtApi {
75357535
*
75367536
* \param[in] session The OrtSession instance.
75377537
* \param[in] graph_annotation_id The annotation ID of the captured graph to release.
7538+
*
7539+
* \snippet{doc} snippets.dox OrtStatus Return Value
7540+
*
7541+
* \since Version 1.27.
7542+
*/
75387543
ORT_API2_STATUS(SessionReleaseCapturedGraph, _In_ OrtSession* session, _In_ int graph_annotation_id);
75397544

75407545
/** \brief Registers a callback to provide EPContext binary data during session load.
@@ -7552,7 +7557,7 @@ struct OrtApi {
75527557
*
75537558
* \snippet{doc} snippets.dox OrtStatus Return Value
75547559
*
7555-
* \since Version 1.28.
7560+
* \since Version 1.27.
75567561
*/
75577562
ORT_API2_STATUS(SessionOptions_SetEpContextDataReadFunc, _Inout_ OrtSessionOptions* options,
75587563
_In_ OrtReadEpContextDataFunc read_func, _In_opt_ void* state);
@@ -8391,9 +8396,9 @@ struct OrtCompileApi {
83918396
* \param[in] write_func The OrtWriteEpContextDataFunc called to write EPContext bytes.
83928397
* \param[in] state Opaque state passed to write_func. Can be NULL.
83938398
*
8394-
* \snippet{doc} snippets.dox OrtStatus Return Value
8395-
*
8396-
* \since Version 1.28.
8399+
* \snippet{doc} snippets.dox OrtStatus Return Value
8400+
*
8401+
* \since Version 1.27.
83978402
*/
83988403
ORT_API2_STATUS(ModelCompilationOptions_SetEpContextDataWriteFunc,
83998404
_In_ OrtModelCompilationOptions* model_compile_options,

include/onnxruntime/core/session/onnxruntime_ep_c_api.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2092,19 +2092,19 @@ struct OrtEpApi {
20922092
* \param[in] session_options The OrtSessionOptions instance.
20932093
* \param[out] config The extracted OrtEpContextConfig.
20942094
*
2095-
* \snippet{doc} snippets.dox OrtStatus Return Value
2096-
*
2097-
* \since Version 1.28.
2095+
* \snippet{doc} snippets.dox OrtStatus Return Value
2096+
*
2097+
* \since Version 1.27.
20982098
*/
20992099
ORT_API2_STATUS(SessionOptions_GetEpContextConfig,
21002100
_In_ const OrtSessionOptions* session_options,
21012101
_Outptr_ OrtEpContextConfig** config);
21022102

21032103
/** \brief Release an OrtEpContextConfig instance.
21042104
*
2105-
* \param[in] input The OrtEpContextConfig instance to release. May be NULL.
2106-
*
2107-
* \since Version 1.28.
2105+
* \param[in] input The OrtEpContextConfig instance to release. May be NULL.
2106+
*
2107+
* \since Version 1.27.
21082108
*/
21092109
ORT_CLASS_RELEASE(EpContextConfig);
21102110

@@ -2119,9 +2119,9 @@ struct OrtEpApi {
21192119
* \param[out] read_func The registered read callback, or NULL if none was registered.
21202120
* \param[out] state Opaque state pointer passed to read_func, or NULL if none was registered.
21212121
*
2122-
* \snippet{doc} snippets.dox OrtStatus Return Value
2123-
*
2124-
* \since Version 1.28.
2122+
* \snippet{doc} snippets.dox OrtStatus Return Value
2123+
*
2124+
* \since Version 1.27.
21252125
*/
21262126
ORT_API2_STATUS(EpContextConfig_GetEpContextDataReadFunc,
21272127
_In_ const OrtEpContextConfig* config,
@@ -2139,9 +2139,9 @@ struct OrtEpApi {
21392139
* \param[out] write_func The registered write callback, or NULL if none was registered.
21402140
* \param[out] state Opaque state pointer passed to write_func, or NULL if none was registered.
21412141
*
2142-
* \snippet{doc} snippets.dox OrtStatus Return Value
2143-
*
2144-
* \since Version 1.28.
2142+
* \snippet{doc} snippets.dox OrtStatus Return Value
2143+
*
2144+
* \since Version 1.27.
21452145
*/
21462146
ORT_API2_STATUS(EpContextConfig_GetEpContextDataWriteFunc,
21472147
_In_ const OrtEpContextConfig* config,

onnxruntime/core/session/onnxruntime_c_api.cc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4415,7 +4415,7 @@ Second example, if we wanted to add and remove some members, we'd do this:
44154415
In GetApi we now make it return ort_api_3 for version 3.
44164416
*/
44174417

4418-
static constexpr OrtApi ort_api_1_to_28 = {
4418+
static constexpr OrtApi ort_api_1_to_27 = {
44194419
// NOTE: The ordering of these fields MUST not change after that version has shipped since existing binaries depend on this ordering.
44204420

44214421
// Shipped as version 1 - DO NOT MODIFY (see above text for more information)
@@ -4926,9 +4926,8 @@ static constexpr OrtApi ort_api_1_to_28 = {
49264926
&OrtApis::GetMemPatternEnabled,
49274927
&OrtApis::GetSessionExecutionMode,
49284928
&OrtApis::SessionReleaseCapturedGraph,
4929-
// End of Version 27 - DO NOT MODIFY ABOVE (see above text for more information)
4930-
49314929
&OrtApis::SessionOptions_SetEpContextDataReadFunc,
4930+
// End of Version 27 - DO NOT MODIFY ABOVE (see above text for more information)
49324931
};
49334932

49344933
// OrtApiBase can never change as there is no way to know what version of OrtApiBase is returned by OrtGetApiBase.
@@ -4968,10 +4967,10 @@ static_assert(offsetof(OrtApi, CreateExternalInitializerInfo) / sizeof(void*) ==
49684967
static_assert(offsetof(OrtApi, GetTensorElementTypeAndShapeDataReference) / sizeof(void*) == 414, "Size of version 24 API cannot change");
49694968
static_assert(offsetof(OrtApi, SetPerSessionThreadPoolCallbacks) / sizeof(void*) == 418, "Size of version 25 API cannot change");
49704969
// no additions in version 26
4971-
static_assert(offsetof(OrtApi, GetSessionExecutionMode) / sizeof(void*) == 420, "Size of version 27 API cannot change");
4970+
static_assert(offsetof(OrtApi, SessionOptions_SetEpContextDataReadFunc) / sizeof(void*) == 422, "Size of version 27 API cannot change");
49724971

49734972
// So that nobody forgets to finish an API version, this check will serve as a reminder:
4974-
static_assert(std::string_view(ORT_VERSION) == "1.28.0",
4973+
static_assert(std::string_view(ORT_VERSION) == "1.27.0",
49754974
"ORT_Version change detected, please follow below steps to ensure OrtApi is updated properly");
49764975
// 1. Update the hardcoded version string in above static_assert to silence it
49774976
//
@@ -4987,7 +4986,7 @@ static_assert(std::string_view(ORT_VERSION) == "1.28.0",
49874986

49884987
ORT_API(const OrtApi*, OrtApis::GetApi, uint32_t version) {
49894988
if (version >= 1 && version <= ORT_API_VERSION)
4990-
return &ort_api_1_to_28;
4989+
return &ort_api_1_to_27;
49914990

49924991
fprintf(stderr,
49934992
"The requested API version [%u] is not available, only API versions [1, %u] are supported in this build."

0 commit comments

Comments
 (0)