mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
use exe/exepath in our genrules
Pull Request resolved: https://github.com/pytorch/pytorch/pull/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
This commit is contained in:
parent
86606fbe22
commit
e21c0ac9a5
|
|
@ -46,7 +46,7 @@ def define_targets(rules):
|
||||||
] + rules.glob(["aten/src/ATen/templates/*"])
|
] + rules.glob(["aten/src/ATen/templates/*"])
|
||||||
|
|
||||||
gen_aten_cmd = " ".join([
|
gen_aten_cmd = " ".join([
|
||||||
"$(location //torchgen:gen)",
|
"$(execpath //torchgen:gen)",
|
||||||
"--install_dir=$(RULEDIR)",
|
"--install_dir=$(RULEDIR)",
|
||||||
"--source-path aten/src/ATen",
|
"--source-path aten/src/ATen",
|
||||||
] + (["--static_dispatch_backend CPU"] if rules.is_cpu_static_dispatch_build() else []))
|
] + (["--static_dispatch_backend CPU"] if rules.is_cpu_static_dispatch_build() else []))
|
||||||
|
|
@ -119,7 +119,7 @@ def define_targets(rules):
|
||||||
":version.txt",
|
":version.txt",
|
||||||
],
|
],
|
||||||
outs = ["torch/csrc/api/include/torch/version.h"],
|
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) " +
|
"--template-path $(location :torch/csrc/api/include/torch/version.h.in) " +
|
||||||
"--version-path $(location :version.txt) --output-path $@ ",
|
"--version-path $(location :version.txt) --output-path $@ ",
|
||||||
tools = ["//tools/setup_helpers:gen_version_header"],
|
tools = ["//tools/setup_helpers:gen_version_header"],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user