File tree Expand file tree Collapse file tree 5 files changed +21
-2
lines changed Expand file tree Collapse file tree 5 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ cc_binary(
8
8
],
9
9
deps = [
10
10
"@libtorch//:libtorch" ,
11
+ "@libtorch//:caffe2" ,
11
12
"//cpp/api:trtorch"
12
13
],
13
14
)
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ cc_binary(
9
9
deps = [
10
10
"//cpp/ptq/datasets:cifar10" ,
11
11
"@libtorch//:libtorch" ,
12
+ "@libtorch//:caffe2" ,
12
13
"//cpp/api:trtorch" ,
13
14
"@tensorrt//:nvinfer"
14
15
],
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ cc_binary(
7
7
],
8
8
deps = [
9
9
"@libtorch//:libtorch" ,
10
+ "@libtorch//:caffe2" ,
10
11
"//cpp/api:trtorch"
11
12
],
12
13
)
Original file line number Diff line number Diff line change 1
1
package (default_visibility = ["//visibility:public" ])
2
2
3
+ config_setting (
4
+ name = "use_pre_cxx11_abi" ,
5
+ values = {
6
+ "define" : "abi=pre_cxx11_abi" ,
7
+ }
8
+ )
9
+
3
10
cc_library (
4
11
name = "util" ,
5
12
hdrs = [
@@ -14,8 +21,18 @@ cc_library(
14
21
deps = [
15
22
"@tensorrt//:nvinfer" ,
16
23
"@libtorch//:libtorch" ,
24
+ "@libtorch//:caffe2" ,
17
25
"//core/conversion" ,
18
26
"//core/util:prelude" ,
19
27
"//cpp/api:trtorch" ,
20
- ]
28
+ ] + select ({
29
+ ":use_pre_cxx11_abi" : [
30
+ "@libtorch_pre_cxx11_abi//:libtorch" ,
31
+ "@libtorch_pre_cxx11_abi//:caffe2" ,
32
+ ],
33
+ "//conditions:default" : [
34
+ "@libtorch//:libtorch" ,
35
+ "@libtorch//:caffe2" ,
36
+ ],
37
+ })
21
38
)
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ cc_library(
27
27
deps = [
28
28
":ATen" ,
29
29
":c10_cuda" ,
30
- ":caffe2"
31
30
],
32
31
includes = [
33
32
"include" ,
You can’t perform that action at this time.
0 commit comments