From 40bf3cfeb717eb43f76ed03dc7343cb44a62565b Mon Sep 17 00:00:00 2001 From: mikey dagitses Date: Thu, 31 Mar 2022 08:56:43 -0700 Subject: [PATCH] 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) --- BUILD.bazel | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index 43d5b1ae04f56..729148d94f616 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -25,16 +25,6 @@ COMMON_COPTS = [ "-DUSE_CUDNN", ]) -# TODO: refactor this into its own library (but how to make -# a binary based off of a module in a library?) -py_binary( - name = "gen", - srcs = ["tools/setup_helpers/gen.py"], - deps = [ - "//tools/codegen" - ], -) - aten_generation_srcs = ["aten/src/ATen/native/native_functions.yaml"] + glob(["aten/src/ATen/templates/**"]) generated_cpu_cpp = [ @@ -102,7 +92,7 @@ generate_aten( aten_ufunc_generated_cuda_sources("aten/src/ATen/{}") + ["aten/src/ATen/Declarations.yaml"] ), - generator=":gen", + generator = "//tools/codegen:gen", ) py_library(