Is your feature request related to a problem? Please describe.
I want to use KernelInfoGetAttribute funtion to get attributes from onnx model, but current KernelInfoGetAttribute only support return string/float/int64_t, what I want to get is vector of string/float/int64_t.
//onnxruntime/include/onnxruntime/core/session/onnxruntime_c_api.h
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);
System information
Additional context
attributes type is vector of string/float/int64_t is very common, for example Conv, its dilations, kernel_shape, pads and strides could usually be vector of int64_t, so you really should support this feature.
I'm thinking, usually the data of attribute info is small, can we open an interface that directly pass the serialized AttributeProto protobuf to the user? Then it will support any data type ONNX needs. I believe in most of the cases the performance of parsing an AttributeProto isn't a concern.
@snnn open an interface to get attribute info is more important, but now customer op can only get attributes for single data, some time it's not working
@pranavsharma what do you think?
@pranavsharma
@pranavsharma
We'll discuss and get back to you next week.