onnxruntime
64541a58 - [DML EP] Remove unconnected nodes from the graph (#14155)

Commit
3 years ago
[DML EP] Remove unconnected nodes from the graph (#14155) ### Description Remove unconnected nodes from the DML EP graph. ### Motivation and Context Some operators like `EmbedLayerNorm` have many outputs, and some of the outputs are non-optional. But in practice, they act like optional outputs because they can have a value of 0, which means that the rest of the model doesn't need to depend on those. The problem with that is that DML will implicitly remove those output from the graph, but the nodes that feed into that output will stay and become unconnected from the rest of the graph, which is illegal in DML. Removing unconnected nodes as a last pass will make sure that those nodes are getting removed and will simplify the logic of individual operators by not having to account for these special cases.
Parents
Loading