Skip to content

Need to support user provide ORT session options in onnx_graphsurgeon fold_constants #4574

@OYCN

Description

@OYCN

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions