Skip to content

Commit

Permalink
run peephole to do profile-based optimizations (pytorch#33337)
Browse files Browse the repository at this point in the history
Summary:
We need to run a peephole before constant propagation in the profiling pipeline, so we fold `prim::shape` for inputs with complete tensor types.
Pull Request resolved: pytorch#33337

Differential Revision: D19905624

Pulled By: Krovatkin

fbshipit-source-id: 80fff067941556053847ddc7afe0fd1c7a89a3ba
  • Loading branch information
Krovatkin authored and facebook-github-bot committed Feb 20, 2020
1 parent 1a25747 commit 36d724c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions torch/csrc/jit/profiling_graph_executor_impl.cpp
Expand Up @@ -84,6 +84,7 @@ void ProfilingGraphExecutorImpl::runProfilingOptimizations(
specializeAutogradZero(*copy);

runRequiredPasses(copy);
PeepholeOptimize(copy);
ConstantPropagation(copy);
runOptimization(copy);

Expand Down

0 comments on commit 36d724c

Please sign in to comment.