Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark end of version 11 C API. #10803

Merged
merged 2 commits into from
Mar 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions onnxruntime/core/session/onnxruntime_c_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
pranavsharma marked this conversation as resolved.
Show resolved Hide resolved
};

// 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)
Expand All @@ -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");
Expand Down