Revert "Revert D32498572: allow external backend codegen to be used without autograd kernels" (#69949)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/69949
This reverts commit 33363cea64fd4be16975c32cf57e9eb123af371d.
Test Plan: Imported from OSS
Reviewed By: H-Huang
Differential Revision: D33113544
Pulled By: bdhirsh
fbshipit-source-id: e219f10d52776498c9ad273e97bca3e3406cf702