Fix NameError with PYTORCH_JIT=0 (#20120)
Summary:
Right now using `PYTORCH_JIT=0` gives this error:
`NameError: name '_CachedForward' is not defined`](https://our.intern.facebook.com/intern/diff/15210046/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20120
Pulled By: driazati
Differential Revision: D15210046
fbshipit-source-id: 493716d38e0078bfe96fab3dc624ec029988cf1c