Skip to content

Commit 06263e2

Browse files
author
Michael Andreas Dagitses
committed
move generated-autograd-headers to the shared build structure
Pull Request resolved: #76183 This is a relatively simple target but we have to fix our header expansion to understand generated files. Next step will be to use this in Bazel. ghstack-source-id: 154678047 Differential Revision: [D35820541](https://our.internmc.facebook.com/intern/diff/D35820541/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D35820541/)!
1 parent bc8881f commit 06263e2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

build.bzl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ def define_targets(rules):
4242
"--gen_lazy_ts_backend",
4343
)
4444

45+
rules.cc_library(
46+
name = "generated-autograd-headers",
47+
hdrs = [":{}".format(h) for h in _GENERATED_AUTOGRAD_CPP_HEADERS + _GENERATED_AUTOGRAD_PYTHON_HEADERS],
48+
tags = ["no-caffe2-headers"],
49+
visibility = ["//visibility:public"],
50+
)
51+
4552
rules.genrule(
4653
name = "version_h",
4754
srcs = [
@@ -74,8 +81,6 @@ _GENERATED_AUTOGRAD_CPP_HEADERS = [
7481
"torch/csrc/autograd/generated/variable_factories.h",
7582
]
7683

77-
GENERATED_AUTOGRAD_H = _GENERATED_AUTOGRAD_CPP_HEADERS + _GENERATED_AUTOGRAD_PYTHON_HEADERS
78-
7984
GENERATED_TESTING_PY = [
8085
"torch/testing/_internal/generated/annotated_fn_args.py",
8186
]

0 commit comments

Comments
 (0)