mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-23 02:38:28 +00:00
* Outputs from model execution should always be returned in a newly allocated buffer or an pre-allocated buffer provided in fetches. When an initializer is providing a graph output (e.g. constant folding may result in this) we were returning an OrtValue that pointed to the initializer and not a separately allocated buffer with a copy. This was wrong as: - value wasn't returned in a pre-allocated fetch so whilst the value returned was correct, it was returned in the wrong place - user could alter the data in the initializer via the returned value * Add unit test with and without pre-allocated fetch. * Add some extra info around why we're handling this special case.
222 B
222 B