[PyTorch] move from input ivalues in ByteCodeDeserializer (#64029)
authorScott Wolchok <swolchok@fb.com>
Thu, 9 Sep 2021 01:30:14 +0000 (18:30 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 9 Sep 2021 01:32:48 +0000 (18:32 -0700)
commit0d0d2f2ac596cda6bb785bbfe49447bbbe545d73
treeb77c84b483d11e199f3668f31be813fd3f464597
parentf5e76b4e38fd27576350177403387214d7e4f708
[PyTorch] move from input ivalues in ByteCodeDeserializer (#64029)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/64029

This should save us a separate pass over the data structure to destroy it.
ghstack-source-id: 137566821

Test Plan:
Pixel3
before:
https://www.internalfb.com/intern/aibench/details/503337445067962
after:
https://our.intern.facebook.com/intern/aibench/details/320277034999340

overall mean time decreased from 373 ms to 358 ms. In flame graph, we
can see that some time spent destroying a vector of IValues was moved
into parseMethods, and the new parseMethods time is less than the old
time plus the recursive destruction time.

Reviewed By: dhruvbird

Differential Revision: D30559530

fbshipit-source-id: d080295a846745ea03ac50f08f4f6c95f4eaf3d8
torch/csrc/jit/mobile/import.cpp