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

ORT Custom op APIs support get vector<string> type attributes of a node [Feature Request] #18911

Open
AgFeather opened this issue Dec 22, 2023 · 0 comments
Labels
api issues related to all other APIs: C, C++, Python, etc. feature request request for unsupported feature or enhancement

Comments

@AgFeather
Copy link

AgFeather commented Dec 22, 2023

Describe the feature request

I am working at adding more custom ops with onnxruntime custom OrtApis.

Now we have a node with vector string type attributes but it seems that there is not any apis I can use to access this kind of attributes. I have been scan the onnxruntime_c_api.h file. it seems that we can only access the following 5 kind of attributes in a custom node:

float; int; string; vector<float>; vector<int>

by the following APi like:
 ORT_API2_STATUS(KernelInfoGetAttributeArray_float, _In_ const OrtKernelInfo* info, _In_ const char* name,
                  _Out_ float* out, _Inout_ size_t* size);
ORT_API2_STATUS(KernelInfoGetAttributeArray_int64, _In_ const OrtKernelInfo* info, _In_ const char* name,
                  _Out_ int64_t* out, _Inout_ size_t* size);

ORT_API2_STATUS(KernelInfoGetAttribute_float, _In_ const OrtKernelInfo* info, _In_ const char* name,
                  _Out_ float* out);
ORT_API2_STATUS(KernelInfoGetAttribute_int64, _In_ const OrtKernelInfo* info, _In_ const char* name,
                  _Out_ int64_t* out);
ORT_API2_STATUS(KernelInfoGetAttribute_string, _In_ const OrtKernelInfo* info, _In_ const char* name, _Out_ char* out,
                  _Inout_ size_t* size);

Describe scenario use case

what I really want is an custom Ort api to access vector attribute in a node, this api might be like:

ORT_API2_STATUS(KernelInfoGetAttributeArray_string, _In_ const OrtKernelInfo* info, _In_ const char* name,
                  _Out_ int64_t* out, _Inout_ size_t* size);
@AgFeather AgFeather added the feature request request for unsupported feature or enhancement label Dec 22, 2023
@yf711 yf711 added the api issues related to all other APIs: C, C++, Python, etc. label Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api issues related to all other APIs: C, C++, Python, etc. feature request request for unsupported feature or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants