Commit Graph

3 Commits

Author SHA1 Message Date
cyy
bfeb45e46b [17/N] Fix clang-tidy warnings in jit (#132753)
Follows #132604
Pull Request resolved: https://github.com/pytorch/pytorch/pull/132753
Approved by: https://github.com/Skylion007
2024-08-07 03:47:54 +00:00
Bin Bao
0dd1d60d54 [JIT] Remove Dropout during Frozon Optimization (#51589)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/51589

Dropout operators are only needed in training. Remove them for frozen models.

Test Plan: Imported from OSS

Reviewed By: eellison

Differential Revision: D26214259

fbshipit-source-id: 3ab05869e1e1f6c57498ba62bf40944f7c2189aa
2021-02-08 08:38:08 -08:00
Kimish Patel
f954dd7823 Add dropout removal pass. (#38253)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38253

This pass removes dropout and dropout_ nodes when training is false. It
requires to have run freeze_module pass which does both inlining and constant
propagation, without which training variable remains as attribute instead of
constant.
ghstack-source-id: 103939141

Test Plan: python test/test_jit.py TestScript.test_remove_dropout

Reviewed By: dreiss

Differential Revision: D21505863

fbshipit-source-id: 42ea45804e4653b625b6a254c8d8480757264aa8
2020-05-12 14:38:34 -07:00