microsoft / microsoft/onnxruntime
Create OrtKernelInfo for use in CreateOp via the C API
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 179
Description
Is your feature request related to a problem? Please describe.
I'd like to expose the CreateOp and InvokeOp methods in Java, but I need to be able to create an OrtKernelInfo and an OrtKernelContext to call the methods. It looks like the OrtKernelInfo is an alias for OpKernelInfo which is used to look up the EP to use. OrtKernelContext is an alias for OpKernelContext used to wrap the thread pool and the logger for the op execution.
System information
- ONNX Runtime version (you are using):
master
Describe the solution you'd like
Ability to create these classes from an instance of OrtSession using the execution providers defined inside it or an instance of OrtEnv by requesting a specific execution provider.
Describe alternatives you've considered
Instantiating these types isn't part of the C API I can see, so there isn't really any alternative without using non-public APIs.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the public C API entry points for CreateOp and InvokeOp, then review how OrtKernelInfo and OrtKernelContext alias OpKernelInfo and OpKernelContext. Check the Java exposure requirements described in the issue and determine how construction should use an OrtSession's execution providers or a requested provider from OrtEnv. Done means the required types can be created through supported public APIs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp, java
- Domain
- api, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100