Remove dead code in module.cpp (#19022)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19022
ghimport-source-id: cdf694c1b426eb9f82d4c148c9f2c2cfc180cedd
Reviewed By: eellison
Differential Revision: D14833409
Pulled By: driazati
fbshipit-source-id: 8914c7227add7f3e07f56b21a513ba7727fb6800