torchdynamo support modules() for nn_module (#88023)
Differential Revision: D40820879
This diff allows models to call self.modules() during dynamo tracing.
cc @mlazos @soumith @voznesenskym @yanboliang @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @chunyuan-w @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx
Pull Request resolved: https://github.com/pytorch/pytorch/pull/88023
Approved by: https://github.com/tugsbayasgalan, https://github.com/voznesenskym, https://github.com/jansel