Fix submodule traversal in insertPackUnpack pass. (#29914)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/29914
Currently we're visiting all submodules every time we're visiting a
method of a module.
Test Plan: Imported from OSS
Differential Revision: D18534602
Pulled By: ZolotukhinM
fbshipit-source-id: 38c5b0ab0bdd27599fd0a6af0eaa3603c68a97a8
Author
Mikhail Zolotukhin