Skip to content

Commit 8a1a93a

Browse files
Michael Andreas Dagitsespytorchmergebot
Michael Andreas Dagitses
authored andcommitted
port Bazel //tools/autograd to shared build structure
Pull Request resolved: #74749 Differential Revision: [D35145072](https://our.internmc.facebook.com/intern/diff/D35145072/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D35145072/)! Approved by: https://github.com/albanD
1 parent ab0d9b1 commit 8a1a93a

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

tools/autograd/BUILD.bazel

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
py_library(
2-
name = "autograd",
3-
srcs = glob(["*.py"]),
4-
data = glob([
5-
"*.yaml",
6-
"templates/*",
7-
]),
8-
visibility = ["//:__subpackages__"],
9-
deps = ["//tools/codegen"],
10-
)
1+
load("//:tools/bazel.bzl", "rules")
2+
load(":build.bzl", "define_targets")
3+
4+
define_targets(rules = rules)

tools/autograd/build.bzl

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
def define_targets(rules):
2+
rules.py_library(
3+
name = "autograd",
4+
srcs = rules.glob(["*.py"]),
5+
data = rules.glob([
6+
"*.yaml",
7+
"templates/*",
8+
]),
9+
visibility = ["//:__subpackages__"],
10+
deps = [
11+
rules.requirement("PyYAML"),
12+
"//tools/codegen",
13+
],
14+
)

0 commit comments

Comments
 (0)