use the shared //tools/codegen:gen in OSS Bazel (#74471)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74471
ghstack-source-id: 152438662
Test Plan: Rely on CI.
Reviewed By: malfet
Differential Revision: D35011683
fbshipit-source-id: 3729c6c7c1b323e253d9832bb51752af8ae2faa6
(cherry picked from commit 1727d8693fa07e308f7390e6f645516dc9dee6a9)