This repository has been archived by the owner on Nov 11, 2021. It is now read-only.
forked from pytorch/TensorRT
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathBUILD
77 lines (69 loc) · 1.59 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
load("@rules_pkg//:pkg.bzl", "pkg_tar")
config_setting(
name = "windows",
constraint_values = [
"@platforms//os:windows",
],
)
pkg_tar(
name = "include_core",
package_dir = "include/trtorch",
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/conversion/converters/impl/plugins:include",
"//core/runtime:include",
"//core/lowering:include",
"//core/lowering/passes:include",
"//core/util:include",
"//core/util/logging:include"
],
)
pkg_tar(
name = "include",
package_dir = "include/trtorch/",
srcs = [
"//cpp/api:api_headers",
],
)
pkg_tar(
name = "lib",
package_dir = "lib/",
srcs = select({
":windows": ["//cpp/api/lib:trtorch.dll"],
"//conditions:default": [
"//cpp/api/lib:libtrtorch.so",
"//cpp/api/lib:libtrtorchrt.so",
],
}),
mode = "0755",
)
pkg_tar(
name = "bin",
package_dir = "bin/",
srcs = [
"//cpp/trtorchc:trtorchc",
],
mode = "0755",
)
pkg_tar(
name = "libtrtorch",
extension = "tar.gz",
package_dir = "trtorch",
srcs = [
"//:LICENSE"
],
deps = [
":lib",
":include",
":include_core",
] + select({
":windows": [],
"//conditions:default": [":bin"],
}),
)