Skip to content

Commit 6644a9e

Browse files
committed
feat(//cpp/api/lib): New runtime only library
Users now can simply ship the runtime library with their compiled trtorch programs instead of the full compiler. The runtime will load into pytorch on DL_OPEN, LD_PRELOAD or torch.ops.load Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent b39bcbc commit 6644a9e

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

BUILD

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ pkg_tar(
4040
package_dir = "lib/",
4141
srcs = select({
4242
":windows": ["//cpp/api/lib:trtorch.dll"],
43-
"//conditions:default": ["//cpp/api/lib:libtrtorch.so"],
43+
"//conditions:default": [
44+
"//cpp/api/lib:libtrtorch.so",
45+
"//cpp/api/lib:libtrtorchrt.so",
46+
],
4447
}),
4548
mode = "0755",
4649
)

cpp/api/lib/BUILD

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
package(default_visibility = ["//visibility:public"])
22

3+
cc_binary(
4+
name = "libtrtorchrt.so",
5+
srcs = [],
6+
deps = [
7+
"//core/runtime:runtime"
8+
],
9+
linkstatic = True,
10+
linkshared = True
11+
)
12+
313
cc_binary(
414
name = "libtrtorch.so",
515
srcs = [],

0 commit comments

Comments
 (0)