Skip to content

Commit

Permalink
fix package violation caused by D35587412 (pytorch#76808)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#76808

This reached into aten/TARGETS in fbcode.
ghstack-source-id: 155484095

Test Plan: Verified manually.

Reviewed By: dreiss, malfet

Differential Revision: D36128458

fbshipit-source-id: c7447b3a40fe905993e799d211241e72183f8acb
(cherry picked from commit b68eb7a)
  • Loading branch information
mikey dagitses authored and pytorchmergebot committed May 5, 2022
1 parent 8ac6b0a commit 37fb636
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
26 changes: 17 additions & 9 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -1906,12 +1906,20 @@ test_suite(
# as if they are from this package, so we alias them for
# compatibility.

alias(
name = "native_functions.yaml",
actual = "aten/src/ATen/native/native_functions.yaml",
)

alias(
name = "tags.yaml",
actual = "aten/src/ATen/native/tags.yaml",
)
[
alias(
name = paths.basename(path),
actual = path,
)
for path in [
"aten/src/ATen/templates/DispatchKeyNativeFunctions.cpp",
"aten/src/ATen/templates/DispatchKeyNativeFunctions.h",
"aten/src/ATen/templates/LazyIr.h",
"aten/src/ATen/templates/RegisterDispatchKey.cpp",
"aten/src/ATen/native/native_functions.yaml",
"aten/src/ATen/native/tags.yaml",
"aten/src/ATen/native/ts_native_functions.yaml",
"torch/csrc/lazy/core/shape_inference.h",
"torch/csrc/lazy/ts_backend/ts_native_functions.cpp",
]
]
14 changes: 7 additions & 7 deletions build.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ def define_targets(rules):
rules.genrule(
name = "generate-code",
srcs = [
"aten/src/ATen/native/ts_native_functions.yaml",
"aten/src/ATen/templates/DispatchKeyNativeFunctions.cpp",
"aten/src/ATen/templates/DispatchKeyNativeFunctions.h",
"aten/src/ATen/templates/LazyIr.h",
"aten/src/ATen/templates/RegisterDispatchKey.cpp",
"torch/csrc/lazy/core/shape_inference.h",
"torch/csrc/lazy/ts_backend/ts_native_functions.cpp",
":DispatchKeyNativeFunctions.cpp",
":DispatchKeyNativeFunctions.h",
":LazyIr.h",
":RegisterDispatchKey.cpp",
":native_functions.yaml",
":shape_inference.h",
":tags.yaml",
":ts_native_functions.cpp",
":ts_native_functions.yaml",
],
tools = ["//tools/setup_helpers:generate_code"],
outs = _GENERATED_CPP + GENERATED_AUTOGRAD_H + GENERATED_LAZY_H + GENERATED_TESTING_PY,
Expand Down

0 comments on commit 37fb636

Please sign in to comment.