Skip to content

Commit

Permalink
feat(//cpp/api/lib): New runtime only library
Browse files Browse the repository at this point in the history
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 <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
  • Loading branch information
narendasan committed Nov 10, 2020
1 parent b39bcbc commit 6644a9e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 4 additions & 1 deletion BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ pkg_tar(
package_dir = "lib/",
srcs = select({
":windows": ["//cpp/api/lib:trtorch.dll"],
"//conditions:default": ["//cpp/api/lib:libtrtorch.so"],
"//conditions:default": [
"//cpp/api/lib:libtrtorch.so",
"//cpp/api/lib:libtrtorchrt.so",
],
}),
mode = "0755",
)
Expand Down
10 changes: 10 additions & 0 deletions cpp/api/lib/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
package(default_visibility = ["//visibility:public"])

cc_binary(
name = "libtrtorchrt.so",
srcs = [],
deps = [
"//core/runtime:runtime"
],
linkstatic = True,
linkshared = True
)

cc_binary(
name = "libtrtorch.so",
srcs = [],
Expand Down

0 comments on commit 6644a9e

Please sign in to comment.