switch Bazel to the shared generate-code genrule (#75790)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75790
We were building it before, but now we use it in downstream
rules. This enables us to eliminate the handwritten genrule.
ghstack-source-id: 155300051
Test Plan: Verified locally and in CI.
Reviewed By: dreiss
Differential Revision: D35645390
fbshipit-source-id: 478bb37a6ec295c232f66383babf46606e83ed5e
(cherry picked from commit 2822d4c5b48c6d9282149b2d43cf72d645237196)