Need to support user provide ORT session options in onnx_graphsurgeon fold_constants
Open
Nobody has claimed this yet.
Module:GraphSurgeon
- Dominant language
- C++
- Stars
- 13.4k
- Forks
- 2.4k
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 2
Description
Hi,
Maybe the user needs to be able to pass SessionOptions to onnxruntime.InferenceSession logic in graph surgeon
For example:
User can provide the custom operator libs by
so = ort.SessionOptions()
so.register_custom_ops_library(...)
g.fold_constants(..., ort_session_options=so)
Passing some options to avoid some ORT bug
so = ort.SessionOptions()
so.graph_optimization_level = ort.GraphOptimizationLevel.ORT_DISABLE_ALL
g.fold_constants(..., ort_session_options=so)
B.R.
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
Locate the onnx_graphsurgeon fold_constants entry point and inspect how it creates onnxruntime.InferenceSession. Trace how an ort_session_options argument could reach that session, then check the existing fold_constants behavior. Done means callers can pass ort.SessionOptions for custom operator libraries or graph optimization settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100