Fix API 16's marker (#17640)

This commit is contained in:
Changming Sun 2023-09-20 19:51:50 -07:00 committed by GitHub
parent 1f991f27f1
commit 4f3f4366d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.
@ -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",