File tree Expand file tree Collapse file tree 5 files changed +101
-87
lines changed Expand file tree Collapse file tree 5 files changed +101
-87
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ pkg_tar(
65
65
name = "libtrtorch" ,
66
66
srcs = [
67
67
"//:LICENSE" ,
68
- "//bzl_def:BUILD.bzl " ,
68
+ "//bzl_def:BUILD" ,
69
69
"//bzl_def:WORKSPACE"
70
70
],
71
71
extension = "tar.gz" ,
Original file line number Diff line number Diff line change 1
1
package (default_visibility = ["//visibility:public" ])
2
2
3
- exports_files ([
4
- "WORKSPACE" ,
5
- "BUILD.bzl"
6
- ])
3
+ config_setting (
4
+ name = "aarch64_linux" ,
5
+ constraint_values = [
6
+ "@platforms//cpu:aarch64" ,
7
+ "@platforms//os:linux" ,
8
+ ],
9
+ )
10
+
11
+ config_setting (
12
+ name = "windows" ,
13
+ constraint_values = [
14
+ "@platforms//os:windows" ,
15
+ ],
16
+ )
17
+
18
+ cc_library (
19
+ name = "libtrtorch" ,
20
+ srcs = select ({
21
+ ":windows" : [
22
+ "lib/x64/trtorch.dll" ,
23
+ ],
24
+ "//conditions:default" : [
25
+ "lib/libtrtorch.so" ,
26
+ ],
27
+ }),
28
+ hdrs = glob ([
29
+ "include/**/*.h" ,
30
+ ]),
31
+ strip_include_prefix = "include" ,
32
+ includes = ["include/" ]
33
+ )
34
+
35
+ cc_library (
36
+ name = "libtrtorchrt" ,
37
+ srcs = select ({
38
+ ":windows" : [
39
+ "lib/x64/trtorchrt.dll"
40
+ ],
41
+ "//conditions:default" : [
42
+ "lib/libtrtorchrt.so"
43
+ ]
44
+ })
45
+ )
46
+
47
+ cc_library (
48
+ name = "libtrtorch_plugins" ,
49
+ srcs = select ({
50
+ ":windows" : [
51
+ "lib/x64/trtorch_plugins.dll"
52
+ ],
53
+ "//conditions:default" : [
54
+ "lib/libtrtorch_plugins.so"
55
+ ]
56
+ }),
57
+ hdrs = glob ([
58
+ "include/trtorch/core/plugins/**/*.h" ,
59
+ ]),
60
+ strip_include_prefix = "include" ,
61
+ includes = ["include/" ]
62
+ )
63
+
64
+ cc_library (
65
+ name = "trtorch_core_hdrs" ,
66
+ hdrs = glob ([
67
+ "include/trtorch/core/**/*.h"
68
+ ]),
69
+ strip_include_prefix = "include/trtorch" ,
70
+ includes = ["include/trtorch/" ]
71
+ )
72
+
73
+ # Alias for ease of use
74
+ cc_library (
75
+ name = "trtorch" ,
76
+ deps = [
77
+ ":libtrtorch" ,
78
+ ]
79
+ )
Original file line number Diff line number Diff line change
1
+ package (default_visibility = ["//visibility:public" ])
2
+
3
+ exports_files ([
4
+ "WORKSPACE" ,
5
+ "BUILD"
6
+ ])
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -7,6 +7,13 @@ config_setting(
7
7
},
8
8
)
9
9
10
+ config_setting (
11
+ name = "ci_build_testing" ,
12
+ values = {
13
+ "define" : "trtorch_src=pre_built"
14
+ }
15
+ )
16
+
10
17
cc_library (
11
18
name = "util" ,
12
19
srcs = [
@@ -20,9 +27,6 @@ cc_library(
20
27
"util.h" ,
21
28
],
22
29
deps = [
23
- "//core/conversion" ,
24
- "//core/util:prelude" ,
25
- "//cpp:trtorch" ,
26
30
"@tensorrt//:nvinfer" ,
27
31
] + select ({
28
32
":use_pre_cxx11_abi" : [
@@ -33,5 +37,15 @@ cc_library(
33
37
"@libtorch//:libtorch" ,
34
38
"@libtorch//:caffe2" ,
35
39
],
40
+ }) + select ({
41
+ ":ci_build_testing" : [
42
+ "@trtorch//:trtorch" ,
43
+ "@trtorch//:trtorch_core_hdrs"
44
+ ],
45
+ "//conditions:default" : [
46
+ "//cpp:trtorch" ,
47
+ "//core/conversion" ,
48
+ "//core/util:prelude"
49
+ ]
36
50
}),
37
51
)
You can’t perform that action at this time.
0 commit comments