onnxruntime/include
Scott McKay 971058fc38
Avoid copy of pre-existing value to subgraph output (#637)
* Add AllocKind::kShare to allow copying the MLValue for a pre-existing value to a graph output when an Identity node is involved. Ideally we can make this handling for an Identity node more general purpose, however the current logic to free an MLValue during execution doesn't take into account a re-use point also needing a free. Due to that, limit the scope and start with a somewhat ugly hardcoded approach.

Migrate some changes from PR497

The existing Loop unit tests exercise the new code. Also manually stepped through the problematic model to verify the unnecessary copy was avoided.

* Fix build error

* Fix missing switch case in debug output of allocation plan

* Limit optimization to Loop
2019-03-19 06:55:59 +10:00
..
onnxruntime/core Avoid copy of pre-existing value to subgraph output (#637) 2019-03-19 06:55:59 +10:00