Skip to content

Commit 12eda44

Browse files
author
Gopalakrishnan Nallasamy
committed
Correct ORT version metadata to 1.27.0
1 parent 7b081c6 commit 12eda44

4 files changed

Lines changed: 25 additions & 26 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: 7 additions & 7 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" {
@@ -7540,9 +7540,9 @@ struct OrtApi {
75407540
* \param[in] read_func The OrtReadEpContextDataFunc callback.
75417541
* \param[in] state Opaque state passed to read_func. Can be NULL.
75427542
*
7543-
* \snippet{doc} snippets.dox OrtStatus Return Value
7544-
*
7545-
* \since Version 1.28.
7543+
* \snippet{doc} snippets.dox OrtStatus Return Value
7544+
*
7545+
* \since Version 1.27.
75467546
*/
75477547
ORT_API2_STATUS(SessionOptions_SetEpContextDataReadFunc, _Inout_ OrtSessionOptions* options,
75487548
_In_ OrtReadEpContextDataFunc read_func, _In_opt_ void* state);
@@ -8381,9 +8381,9 @@ struct OrtCompileApi {
83818381
* \param[in] write_func The OrtWriteEpContextDataFunc called to write EPContext bytes.
83828382
* \param[in] state Opaque state passed to write_func. Can be NULL.
83838383
*
8384-
* \snippet{doc} snippets.dox OrtStatus Return Value
8385-
*
8386-
* \since Version 1.28.
8384+
* \snippet{doc} snippets.dox OrtStatus Return Value
8385+
*
8386+
* \since Version 1.27.
83878387
*/
83888388
ORT_API2_STATUS(ModelCompilationOptions_SetEpContextDataWriteFunc,
83898389
_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
@@ -4408,7 +4408,7 @@ Second example, if we wanted to add and remove some members, we'd do this:
44084408
In GetApi we now make it return ort_api_3 for version 3.
44094409
*/
44104410

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

44144414
// Shipped as version 1 - DO NOT MODIFY (see above text for more information)
@@ -4918,9 +4918,8 @@ static constexpr OrtApi ort_api_1_to_28 = {
49184918
// End of Version 26 - DO NOT MODIFY ABOVE (see above text for more information)
49194919
&OrtApis::GetMemPatternEnabled,
49204920
&OrtApis::GetSessionExecutionMode,
4921-
// End of Version 27 - DO NOT MODIFY ABOVE (see above text for more information)
4922-
49234921
&OrtApis::SessionOptions_SetEpContextDataReadFunc,
4922+
// End of Version 27 - DO NOT MODIFY ABOVE (see above text for more information)
49244923
};
49254924

49264925
// OrtApiBase can never change as there is no way to know what version of OrtApiBase is returned by OrtGetApiBase.
@@ -4960,10 +4959,10 @@ static_assert(offsetof(OrtApi, CreateExternalInitializerInfo) / sizeof(void*) ==
49604959
static_assert(offsetof(OrtApi, GetTensorElementTypeAndShapeDataReference) / sizeof(void*) == 414, "Size of version 24 API cannot change");
49614960
static_assert(offsetof(OrtApi, SetPerSessionThreadPoolCallbacks) / sizeof(void*) == 418, "Size of version 25 API cannot change");
49624961
// no additions in version 26
4963-
static_assert(offsetof(OrtApi, GetSessionExecutionMode) / sizeof(void*) == 420, "Size of version 27 API cannot change");
4962+
static_assert(offsetof(OrtApi, SessionOptions_SetEpContextDataReadFunc) / sizeof(void*) == 421, "Size of version 27 API cannot change");
49644963

49654964
// So that nobody forgets to finish an API version, this check will serve as a reminder:
4966-
static_assert(std::string_view(ORT_VERSION) == "1.28.0",
4965+
static_assert(std::string_view(ORT_VERSION) == "1.27.0",
49674966
"ORT_Version change detected, please follow below steps to ensure OrtApi is updated properly");
49684967
// 1. Update the hardcoded version string in above static_assert to silence it
49694968
//
@@ -4979,7 +4978,7 @@ static_assert(std::string_view(ORT_VERSION) == "1.28.0",
49794978

49804979
ORT_API(const OrtApi*, OrtApis::GetApi, uint32_t version) {
49814980
if (version >= 1 && version <= ORT_API_VERSION)
4982-
return &ort_api_1_to_28;
4981+
return &ort_api_1_to_27;
49834982

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

0 commit comments

Comments
 (0)