Skip to content

Commit

Permalink
use exe/exepath in our genrules
Browse files Browse the repository at this point in the history
Pull Request resolved: pytorch#79626

Buck does not properly handle caching when the executable is
identified with `$(location ...)`. See
https://fb.workplace.com/groups/askbuck/posts/8600146743367198 for
more information.

Differential Revision: [D37179273](https://our.internmc.facebook.com/intern/diff/D37179273/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D37179273/)!

Approved by: https://github.com/malfet
  • Loading branch information
Michael Andreas Dagitses authored and pytorchmergebot committed Jun 16, 2022
1 parent 86606fb commit e21c0ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def define_targets(rules):
] + rules.glob(["aten/src/ATen/templates/*"])

gen_aten_cmd = " ".join([
"$(location //torchgen:gen)",
"$(execpath //torchgen:gen)",
"--install_dir=$(RULEDIR)",
"--source-path aten/src/ATen",
] + (["--static_dispatch_backend CPU"] if rules.is_cpu_static_dispatch_build() else []))
Expand Down Expand Up @@ -119,7 +119,7 @@ def define_targets(rules):
":version.txt",
],
outs = ["torch/csrc/api/include/torch/version.h"],
cmd = "$(location //tools/setup_helpers:gen_version_header) " +
cmd = "$(execpath //tools/setup_helpers:gen_version_header) " +
"--template-path $(location :torch/csrc/api/include/torch/version.h.in) " +
"--version-path $(location :version.txt) --output-path $@ ",
tools = ["//tools/setup_helpers:gen_version_header"],
Expand Down

0 comments on commit e21c0ac

Please sign in to comment.