forked from pytorch/TensorRT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
81 lines (75 loc) · 1.79 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
load("@rules_pkg//:pkg.bzl", "pkg_tar")
config_setting(
name = "windows",
constraint_values = [
"@platforms//os:windows",
],
)
pkg_tar(
name = "include_core",
package_dir = "include/torch_tensorrt",
deps = [
"//core:include",
"//core/conversion:include",
"//core/conversion/conversionctx:include",
"//core/conversion/converters:include",
"//core/conversion/var:include",
"//core/conversion/tensorcontainer:include",
"//core/conversion/evaluators:include",
"//core/ir:include",
"//core/lowering:include",
"//core/lowering/passes:include",
"//core/partitioning:include",
"//core/plugins:impl_include",
"//core/plugins:include",
"//core/runtime:include",
"//core/util:include",
"//core/util/logging:include",
],
)
pkg_tar(
name = "include",
srcs = [
"//cpp:api_headers",
],
package_dir = "include/torch_tensorrt/",
)
pkg_tar(
name = "lib",
srcs = select({
":windows": ["//cpp/lib:torch_tensorrt.dll"],
"//conditions:default": [
"//cpp/lib:libtorchtrt.so",
"//cpp/lib:libtorchtrt_runtime.so",
"//cpp/lib:libtorchtrt_plugins.so",
],
}),
mode = "0755",
package_dir = "lib/",
)
pkg_tar(
name = "bin",
srcs = [
"//cpp/bin/torchtrtc",
],
mode = "0755",
package_dir = "bin/",
)
pkg_tar(
name = "libtorchtrt",
srcs = [
"//:LICENSE",
"//bzl_def:BUILD",
"//bzl_def:WORKSPACE"
],
extension = "tar.gz",
package_dir = "torch_tensorrt",
deps = [
":lib",
":include",
":include_core",
] + select({
":windows": [],
"//conditions:default": [":bin"],
}),
)