mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-30 03:37:44 +00:00
Mark end of version 11 C API. (#10803)
* Mark end of version 11 C API * Add static_assert
This commit is contained in:
parent
3ae2bfaefe
commit
97ae44d060
1 changed files with 2 additions and 2 deletions
|
|
@ -2500,7 +2500,6 @@ static constexpr OrtApi ort_api_1_to_11 = {
|
|||
&OrtApis::GetSparseTensorIndices,
|
||||
// End of Version 9 - DO NOT MODIFY ABOVE (see above text for more information)
|
||||
|
||||
// Version 10 - In development, feel free to add/remove/rearrange here
|
||||
&OrtApis::HasValue,
|
||||
&OrtApis::KernelContext_GetGPUComputeStream,
|
||||
&OrtApis::GetTensorMemoryInfo,
|
||||
|
|
@ -2515,13 +2514,13 @@ static constexpr OrtApi ort_api_1_to_11 = {
|
|||
&OrtApis::SynchronizeBoundOutputs,
|
||||
// End of Version 10 - DO NOT MODIFY ABOVE (see above text for more information)
|
||||
|
||||
// Version 11 - In development, feel free to add/remove/rearrange here
|
||||
&OrtApis::SessionOptionsAppendExecutionProvider_CUDA_V2,
|
||||
&OrtApis::CreateCUDAProviderOptions,
|
||||
&OrtApis::UpdateCUDAProviderOptions,
|
||||
&OrtApis::GetCUDAProviderOptionsAsString,
|
||||
&OrtApis::ReleaseCUDAProviderOptions,
|
||||
&OrtApis::SessionOptionsAppendExecutionProvider_MIGraphX,
|
||||
// End of Version 11 - DO NOT MODIFY ABOVE (see above text for more information)
|
||||
};
|
||||
|
||||
// Asserts to do a some checks to ensure older Versions of the OrtApi never change (will detect an addition or deletion but not if they cancel out each other)
|
||||
|
|
@ -2536,6 +2535,7 @@ static_assert(offsetof(OrtApi, GetCurrentGpuDeviceId) / sizeof(void*) == 161, "S
|
|||
static_assert(offsetof(OrtApi, CreateSessionFromArrayWithPrepackedWeightsContainer) / sizeof(void*) == 169, "Size of version 8 API cannot change");
|
||||
static_assert(offsetof(OrtApi, GetSparseTensorIndices) / sizeof(void*) == 191, "Size of version 9 API cannot change");
|
||||
static_assert(offsetof(OrtApi, SynchronizeBoundOutputs) / sizeof(void*) == 203, "Size of version 10 API cannot change");
|
||||
static_assert(offsetof(OrtApi, SessionOptionsAppendExecutionProvider_MIGraphX) / sizeof(void*) == 209, "Size of version 11 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.11.0", "ORT_Version change detected, please follow below steps to ensure OrtApi is updated properly");
|
||||
|
|
|
|||
Loading…
Reference in a new issue