forked from pytorch/xla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
32 lines (31 loc) · 816 Bytes
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
load(
"@tsl//tsl/platform/default:cuda_build_defs.bzl",
"if_cuda_is_configured",
)
cc_binary(
name = "_XLAC.so",
copts = [
"-DTORCH_API_INCLUDE_EXTENSION_H",
"-DTORCH_EXTENSION_NAME=_XLAC",
"-fopenmp",
"-fPIC",
"-fwrapv",
],
linkopts = [
"-Wl,-rpath,$$ORIGIN/torch_xla/lib", # for libtpu
"-Wl,-soname,_XLAC.so",
"-lstdc++fs", # For std::filesystem
],
linkshared = 1,
visibility = ["//visibility:public"],
deps = [
"//torch_xla/csrc:init_python_bindings",
"@torch//:headers",
"@torch//:libc10",
"@torch//:libtorch",
"@torch//:libtorch_cpu",
"@torch//:libtorch_python",
] + if_cuda_is_configured([
"@xla//xla/stream_executor:cuda_platform",
]),
)