Skip to content

Commit

Permalink
refactor(caffe2): Break out Caffe2 from the LibTorch package to address
Browse files Browse the repository at this point in the history
overlinking

Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
  • Loading branch information
narendasan committed May 16, 2020
1 parent e8d458d commit a71bca9
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions cpp/benchmark/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ cc_binary(
],
deps = [
"@libtorch//:libtorch",
"@libtorch//:caffe2",
"//cpp/api:trtorch"
],
)
1 change: 1 addition & 0 deletions cpp/ptq/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cc_binary(
deps = [
"//cpp/ptq/datasets:cifar10",
"@libtorch//:libtorch",
"@libtorch//:caffe2",
"//cpp/api:trtorch",
"@tensorrt//:nvinfer"
],
Expand Down
1 change: 1 addition & 0 deletions cpp/trtorchexec/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ cc_binary(
],
deps = [
"@libtorch//:libtorch",
"@libtorch//:caffe2",
"//cpp/api:trtorch"
],
)
19 changes: 18 additions & 1 deletion tests/util/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
package(default_visibility = ["//visibility:public"])

config_setting(
name = "use_pre_cxx11_abi",
values = {
"define": "abi=pre_cxx11_abi",
}
)

cc_library(
name = "util",
hdrs = [
Expand All @@ -14,8 +21,18 @@ cc_library(
deps = [
"@tensorrt//:nvinfer",
"@libtorch//:libtorch",
"@libtorch//:caffe2",
"//core/conversion",
"//core/util:prelude",
"//cpp/api:trtorch",
]
] + select({
":use_pre_cxx11_abi": [
"@libtorch_pre_cxx11_abi//:libtorch",
"@libtorch_pre_cxx11_abi//:caffe2",
],
"//conditions:default": [
"@libtorch//:libtorch",
"@libtorch//:caffe2",
],
})
)
1 change: 0 additions & 1 deletion third_party/libtorch/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ cc_library(
deps = [
":ATen",
":c10_cuda",
":caffe2"
],
includes = [
"include",
Expand Down

0 comments on commit a71bca9

Please sign in to comment.