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

Basic CSharp packaging support for ROCm EP #15535

Merged
merged 11 commits into from
May 15, 2023
Merged

Conversation

cloudhan
Copy link
Member

This PR mainly fixes building errors when trying to build nupkg for ROCm EP.
It also slighly improve the packaging logic so that devlopers can produce the nupkg on linux natively.

*
* \param device_id HIP device id, starts from zero.
*/
ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_ROCM, _In_ OrtSessionOptions* options, int device_id);
Copy link
Member

@yuslepukhin yuslepukhin Apr 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ORT_API_STATUS(OrtSess

All new APIs must go at the end of the structure to preserve ABI compatibility. They also must be initialized.
Perhaps, this does not belong to this PR

Copy link
Member Author

@cloudhan cloudhan Apr 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an old API, it belongs to the global scope, no struct involved, so there is no need for initializing as in OrtApi stuct. I am doubt this decl will affect the ABI tho. The API has already been implemented at

ORT_API_STATUS_IMPL(OrtSessionOptionsAppendExecutionProvider_ROCM, _In_ OrtSessionOptions* options, int device_id) {
OrtROCMProviderOptions provider_options{};
provider_options.device_id = device_id;
return OrtApis::SessionOptionsAppendExecutionProvider_ROCM(options, &provider_options);
}
. This decl just expose it, so the C# dll can use it to initialize a sess with the devcie_id API. Subsequent PR adds API for initializing with provider options.

yuslepukhin
yuslepukhin previously approved these changes Apr 19, 2023
Copy link
Member

@yuslepukhin yuslepukhin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Copy link
Member

@yuslepukhin yuslepukhin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@cloudhan cloudhan merged commit dc383ed into main May 15, 2023
@cloudhan cloudhan deleted the guangyunhan/rocm-csharp branch May 15, 2023 23:27
prathikr pushed a commit that referenced this pull request May 16, 2023
This PR mainly fixes building errors when trying to build nupkg for ROCm EP.
It also slighly improve the packaging logic so that devlopers can
produce the nupkg on linux natively.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants