move codegen binary to the common build system (#74470)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74470

Internally, use it as well.
ghstack-source-id: 152438657

Test Plan: Rely on CI to validate.

Reviewed By: malfet

Differential Revision: D35011144

fbshipit-source-id: fb7247470df579ae23fcbc74bd2f8d6cc55cf657
(cherry picked from commit d9b476e2507807097a59c0b0a5ddf029d8dc0ab3)
This commit is contained in:
mikey dagitses
2022-03-31 08:32:56 -07:00
committed by PyTorch MergeBot
parent 88096253ef
commit 785972b4eb
2 changed files with 7 additions and 0 deletions

View File

@ -21,6 +21,7 @@ rules = struct(
filegroup = native.filegroup,
glob = native.glob,
if_cuda = if_cuda,
py_binary = native.py_binary,
py_library = _py_library,
requirement = _requirement,
requires_cuda_enabled = requires_cuda_enabled,

View File

@ -8,3 +8,9 @@ def define_targets(rules):
],
visibility = ["//visibility:public"],
)
rules.py_binary(
name = "gen",
srcs = [":codegen"],
visibility = ["//visibility:public"],
)