Skip to content

Commit

Permalink
Fix API 16's marker (#17640)
Browse files Browse the repository at this point in the history
  • Loading branch information
snnn authored Sep 21, 2023
1 parent 1f991f2 commit 4f3f436
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions onnxruntime/core/session/onnxruntime_c_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2711,9 +2711,8 @@ static constexpr OrtApi ort_api_1_to_17 = {
&OrtApis::GetTensorRTProviderOptionsByName,
&OrtApis::UpdateCUDAProviderOptionsWithValue,
&OrtApis::GetCUDAProviderOptionsByName,
// End of Version 16 - DO NOT MODIFY ABOVE (see above text for more information)

&OrtApis::KernelContext_GetResource,
// End of Version 16 - DO NOT MODIFY ABOVE (see above text for more information)
};

// OrtApiBase can never change as there is no way to know what version of OrtApiBase is returned by OrtGetApiBase.
Expand Down Expand Up @@ -2742,7 +2741,7 @@ static_assert(offsetof(OrtApi, ReleaseKernelInfo) / sizeof(void*) == 218, "Size
static_assert(offsetof(OrtApi, ReleaseCANNProviderOptions) / sizeof(void*) == 224, "Size of version 13 API cannot change");
static_assert(offsetof(OrtApi, GetSessionConfigEntry) / sizeof(void*) == 238, "Size of version 14 API cannot change");
static_assert(offsetof(OrtApi, GetBuildInfoString) / sizeof(void*) == 254, "Size of version 15 API cannot change");
static_assert(offsetof(OrtApi, GetCUDAProviderOptionsByName) / sizeof(void*) == 264, "Size of version 16 API cannot change");
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.17.0",
Expand Down

0 comments on commit 4f3f436

Please sign in to comment.