allow external backend codegen to be used without autograd kernels (#68529)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/68529
Test Plan: Imported from OSS
Reviewed By: wconstab
Differential Revision: D32498572
Pulled By: bdhirsh
fbshipit-source-id: 3e7159c633f6a80b60faa068436a4c49ebe731ca