Skip to content

Commit 5b88b5f

Browse files
authored
Update fix_includes.sh (#5441)
Without this patch I cannot get torch_xla to build outside of the docker. This should fix it.
1 parent 709c75a commit 5b88b5f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

codegen/fix_includes.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ sed -i 's#<torch_xla/csrc/tensor.h>#"torch_xla/csrc/tensor.h"#' $@
66
# remove the runfiles-prefix used in codegen for pytorch
77
# `torchgen` generates relative includes path and does not support customizing the root,
88
# so we have to fix them up.
9-
sed -i 's#bazel-out/k8-opt/bin/codegen/lazy_tensor_generator.runfiles/torch/##' $@
10-
sed -i 's#bazel-out/k8-dbg/bin/codegen/lazy_tensor_generator.runfiles/torch/##' $@
11-
sed -i 's#bazel-out/k8-fastbuild/bin/codegen/lazy_tensor_generator.runfiles/torch/##' $@
9+
sed -i 's#bazel-out/k8-[^/]*/bin/codegen/lazy_tensor_generator.runfiles/torch/##' $@
1210

1311
# use the generated files that are in the compilation unit
1412
sed -i 's#<bazel-out/\(.*\)>#"bazel-out/\1"#' $@

0 commit comments

Comments
 (0)