microsoft/onnxruntime-extensions

OrtApi is currently passed by value

adrianlizarraga opened this issue · 1 comments

Hi,

Due to the following merged ORT PR, passing OrtApi struct arguments by value will result in compilation errors if/when the new C API header file is copied to this repository, which admittedly could be a long time from now.

It might be a good idea to eventually update the various Kernel creation functions to use const OrtApi& api instead of OrtApi api.

If this is something you're interested in "fixing" now, I would be happy to create a PR that updates function signatures. Otherwise, please feel free to close this or keep it open for tracking purposes.

Thanks

@adrianlizarraga Yes, please. The current code based on the API two years ago. If we can make it better now, we should.