onnxruntime/onnxruntime/core/graph
Chi Lo 21ef14476b
Bug fix for nested control flow ops for TRT EP (#16343)
Current TRT EP can support model which has nested control flow ops
(multiple level subgraphs). But it fails at a case where the subgraph
has outer scope value that is defined several levels up in the top-level
graph, in this case, the outer scope value is the input of the top-level
graph. The outer scope values are not properly handled during TRT EP's
subgraph reconstruction stage and fails at `graph.resolve()`.

The way ORT gets capability from EPs is a bottom-up approach meaning
inner most subgraph gets handled first. TRT EP reconstructs each
subgraph level by level and following modifications are made to fix the
outer scope values issue:

- `SetGraphOuterScopeValuesAndInputs()` and `SetAllGraphInputs()` are
added to handle outer scope values and add those values as graph inputs
if needed in order to make `graph.resolve()` happy.
- Change to use `GetNodeArgIncludingParentGraphs` so that when creating
the fused TRT node for some subgraphs in`
Graph::CreateFusedSubGraphNode()`, it can get the NodeArgs for outer
scope values from top-level graph.


This PR fixes https://github.com/microsoft/onnxruntime/issues/16217
2023-07-23 16:16:17 -07:00
..
contrib_ops support rotary embeddings in decoder masked self-attention (#16556) 2023-07-12 13:48:48 -07:00
dml_ops Run clang-format in CI (#15524) 2023-04-18 09:26:58 -07:00
extended_graph_edge.h
function.cc Run clang-format in CI (#15524) 2023-04-18 09:26:58 -07:00
function_container.h Run clang-format in CI (#15524) 2023-04-18 09:26:58 -07:00
function_impl.h Run clang-format in CI (#15524) 2023-04-18 09:26:58 -07:00
function_inliner.h Run clang-format in CI (#15524) 2023-04-18 09:26:58 -07:00
function_template.h
function_utils.cc Introduce float 8 types (#14731) 2023-05-30 13:25:58 -07:00
function_utils.h Introduce float 8 types (#14731) 2023-05-30 13:25:58 -07:00
graph.cc Bug fix for nested control flow ops for TRT EP (#16343) 2023-07-23 16:16:17 -07:00
graph_flatbuffers_utils.cc Minimal Build for On-Device Training (#16326) 2023-06-22 12:27:23 -07:00
graph_flatbuffers_utils.h Minimal Build for On-Device Training (#16326) 2023-06-22 12:27:23 -07:00
graph_proto_serializer.cc Run clang-format in CI (#15524) 2023-04-18 09:26:58 -07:00
graph_proto_serializer.h
graph_utils.cc Triton Codegen for ORTModule (#15831) 2023-07-13 18:17:58 +08:00
graph_utils.h Triton Codegen for ORTModule (#15831) 2023-07-13 18:17:58 +08:00
graph_viewer.cc
model.cc Fix bug with saving model optimized by inference session (#16716) 2023-07-20 18:44:28 -07:00
model.h Fix bug with saving model optimized by inference session (#16716) 2023-07-20 18:44:28 -07:00
model_load_utils.h Run clang-format in CI (#15524) 2023-04-18 09:26:58 -07:00
node_attr_utils.cc
node_attr_utils.h Switch GSL to MS GSL 4.0.0 (#13416) 2022-10-29 04:15:20 -07:00
onnx_protobuf.h
op.cc
op.h
op_identifier.h Update kernel matching logic: decouple from op schemas and remove kernel def hashes (#12791) 2022-09-20 14:24:59 -07:00
op_identifier_utils.cc Update kernel matching logic: decouple from op schemas and remove kernel def hashes (#12791) 2022-09-20 14:24:59 -07:00
op_identifier_utils.h Update kernel matching logic: decouple from op schemas and remove kernel def hashes (#12791) 2022-09-20 14:24:59 -07:00
ort_format_load_options.h Ignore saved runtime optimizations when updating ORT format model <v5. (#13393) 2022-11-08 13:36:46 -08:00
record.h
runtime_optimization_record.h Update kernel matching logic: decouple from op schemas and remove kernel def hashes (#12791) 2022-09-20 14:24:59 -07:00
runtime_optimization_record_container.cc Switch GSL to MS GSL 4.0.0 (#13416) 2022-10-29 04:15:20 -07:00
runtime_optimization_record_container.h Update kernel matching logic: decouple from op schemas and remove kernel def hashes (#12791) 2022-09-20 14:24:59 -07:00
schema_registry.cc Fix issue with schema lookup where there are custom ops using the ONNX domain (#14492) 2023-02-03 08:05:18 +10:00