onnx_ir.analysis
Analysis utilities for ONNX IR graphs.
-
onnx_ir.analysis.analyze_implicit_usage(graph)
Analyze implicit usage of values in sub-graphs.
This function returns a mapping from each sub-graph to a set of
:class:`~onnx_ir.Value`s that are captured from outer scopes (i.e., not defined
within the sub-graph itself).
- Parameters:
graph (Graph) – The graph to analyze.
- Returns:
A dictionary mapping sub-graphs to sets of implicitly used values.
- Return type:
dict[Graph, set[Value]]