forked from pytorch/TensorRT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD
48 lines (43 loc) · 946 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_pkg//:pkg.bzl", "pkg_tar")
package(default_visibility = ["//visibility:public"])
config_setting(
name = "use_pre_cxx11_abi",
values = {
"define": "abi=pre_cxx11_abi",
},
)
config_setting(
name = "python_core",
values = {
"define": "target_lang=python",
},
)
cc_library(
name = "core",
srcs = [
"compiler.cpp",
],
hdrs = [
"compiler.h",
],
deps = [
"//core/conversion",
"//core/runtime",
"//core/lowering",
"//core/partitioning",
"//core/util/logging",
"@tensorrt//:nvinfer",
] + select({
":use_pre_cxx11_abi": ["@libtorch_pre_cxx11_abi//:libtorch"],
"//conditions:default": ["@libtorch//:libtorch"],
}),
alwayslink = True,
)
pkg_tar(
name = "include",
srcs = [
"compiler.h",
],
package_dir = "core/",
)