Enable C2 operators running with {cpu, gpu} * {forward, backward} (#22664)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22664
This diff enables c2 operators to run the combination of {cpu, gpu} * {forward, backward}.
Reviewed By: hl475
Differential Revision: D15781789
fbshipit-source-id: e9843e3c46ea144042829860638d406f6a33792b