Skip to content

Commit 606d4de

Browse files
committed
merge from master
Signed-off-by: inocsin <[email protected]>
2 parents 0bc3c05 + 601ca12 commit 606d4de

File tree

117 files changed

+2180
-1110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+2180
-1110
lines changed

Diff for: BUILD

+2
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ pkg_tar(
6565
name = "libtrtorch",
6666
srcs = [
6767
"//:LICENSE",
68+
"//bzl_def:BUILD",
69+
"//bzl_def:WORKSPACE"
6870
],
6971
extension = "tar.gz",
7072
package_dir = "trtorch",

Diff for: WORKSPACE

+7
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ git_repository(
3131
shallow_since = "1570114335 -0400",
3232
)
3333

34+
# External dependency for trtorch if you already have precompiled binaries.
35+
# This is currently used in pytorch NGC container CI testing.
36+
local_repository(
37+
name = "trtorch",
38+
path = "/opt/conda/lib/python3.8/site-packages/trtorch"
39+
)
40+
3441
# CUDA should be installed on the system locally
3542
new_local_repository(
3643
name = "cuda",

Diff for: bzl_def/BUILD

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
package(default_visibility = ["//visibility:public"])
2+
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+
)

Diff for: bzl_def/BUILD.bazel

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package(default_visibility = ["//visibility:public"])
2+
3+
exports_files([
4+
"WORKSPACE",
5+
"BUILD"
6+
])

Diff for: bzl_def/WORKSPACE

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
workspace(name = "trtorch")

0 commit comments

Comments
 (0)