NVIDIA / NVIDIA/TensorRT

Need to support user provide ORT session options in onnx_graphsurgeon fold_constants

Open
#4,574 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.