-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(//:libtrtorch): Ship a WORKSPACE file and BUILD file with the
tarball so that users can just load it as an HTTP archive Signed-off-by: Naren Dasan <naren@narendasan.com> Signed-off-by: Naren Dasan <narens@nvidia.com>
- Loading branch information
1 parent
f0523f1
commit 7ac6f1c
Showing
4 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package(default_visibility = ["//visibility:public"]) | ||
|
||
exports_files([ | ||
"WORKSPACE", | ||
"BUILD.bzl" | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
package(default_visibility = ["//visibility:public"]) | ||
|
||
config_setting( | ||
name = "aarch64_linux", | ||
constraint_values = [ | ||
"@platforms//cpu:aarch64", | ||
"@platforms//os:linux", | ||
], | ||
) | ||
|
||
config_setting( | ||
name = "windows", | ||
constraint_values = [ | ||
"@platforms//os:windows", | ||
], | ||
) | ||
|
||
cc_library( | ||
name = "libtrtorch", | ||
srcs = select({ | ||
":windows": [ | ||
"lib/x64/trtorch.dll", | ||
], | ||
"//conditions:default": [ | ||
"lib/libtrtorch.so", | ||
], | ||
}), | ||
hdrs = glob([ | ||
"include/**/*.h", | ||
]), | ||
strip_include_prefix = "include", | ||
includes = ["include/"] | ||
) | ||
|
||
cc_library( | ||
name = "libtrtorchrt", | ||
srcs = select({ | ||
":windows": [ | ||
"lib/x64/trtorchrt.dll" | ||
], | ||
"//conditions:default": [ | ||
"lib/libtrtorchrt.so" | ||
] | ||
}) | ||
) | ||
|
||
cc_library( | ||
name = "libtrtorch_plugins", | ||
srcs = select({ | ||
":windows": [ | ||
"lib/x64/trtorch_plugins.dll" | ||
], | ||
"//conditions:default": [ | ||
"lib/libtrtorch_plugins.so" | ||
] | ||
}), | ||
hdrs = glob([ | ||
"include/trtorch/core/plugins/**/*.h", | ||
]), | ||
strip_include_prefix = "include", | ||
includes = ["include/"] | ||
) | ||
|
||
cc_library( | ||
name = "trtorch_core_hdrs", | ||
hdrs = glob([ | ||
"include/trtorch/core/**/*.h" | ||
]), | ||
strip_include_prefix = "include", | ||
includes = ["include/trtorch/"] | ||
) | ||
|
||
# Alias for ease of use | ||
cc_library( | ||
name = "trtorch", | ||
deps = [ | ||
":libtrtorch", | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
workspace(name = "trtorch") |