pytorch
49323423 - [Static Runtime] Fix bug in ClipRangesGatherRangesX2SigridHash (#53799)

Commit
4 years ago
[Static Runtime] Fix bug in ClipRangesGatherRangesX2SigridHash (#53799) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/53799 Fix two issues with ClipRangesGatherRangesX2SigridHash and ClipRangesGatherRangesX2SigridHashPrecompute: - The first issue is with the two step graph rewrite process. If step 2 doesn't happen after step 1, then we're stuck with a graph with a `fb::placeholder` op that can't run. Step 3 is added to revert step 1 so we restore the original graph if there's any `fb::placeholder` op left. - The second issue is with `SigridHashPrecompute`. The coupling with `freeze_module` is not ideal and limits its use to Static Runtime only. By running `ConstantPropagation` and `ConstantPooling` after splitting SigridHash, we can move all the Constant ops to the front of the graph and fusion can happen right afterwards. Reviewed By: ajyu Differential Revision: D26920008 fbshipit-source-id: e4bc67c7a15181bac5dbbfbb95d861849652bddf
Author
Hao Lu
Parents
Loading