pytorch
eaab6533 - Read via FileAdapter when loading files in torch if not flatbuffer - Part 2 (#84296)

Commit
2 years ago
Read via FileAdapter when loading files in torch if not flatbuffer - Part 2 (#84296) Summary: D38998858 (https://github.com/pytorch/pytorch/commit/3fae89d4a468a02be501357eb123ce2bf7086d2f) used the wrong version of `_load_for_mobile` that kept the "load everything in memory then parse" technique. This fixes it to call the `_load_for_mobile_impl` version which for non-flatbuffer models will stream parse. See D38998858 (https://github.com/pytorch/pytorch/commit/3fae89d4a468a02be501357eb123ce2bf7086d2f) for the expected memory optimization gains. Test Plan: CI Signals. Reviewed By: qihqi Differential Revision: D39138280 Pull Request resolved: https://github.com/pytorch/pytorch/pull/84296 Approved by: https://github.com/qihqi
Author
Ian Graves
Committer
Parents
Loading