-
Notifications
You must be signed in to change notification settings - Fork 372
Include bin and headers to packaging and provide option to ensure tests can use precompiled trtorch libs #670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
7ac6f1c
feat(//:libtrtorch): Ship a WORKSPACE file and BUILD file with the
narendasan 9860f85
chore: example on how to use external trtorch as a dep
narendasan b5c324a
feat: Add functionality for tests to use precompiled libraries
peri044 4807d8d
chore: Add trtorch external dependency option in the dockerfile
peri044 ddc0685
feat: Augment python package to include bin, lib, include directories
peri044 bafa675
chore: Add missing header files to the python package
peri044 eb9e1f6
Merge branch 'master' into build_workspace
peri044 45a16c5
chore: Modify external trtorch dependency to point to pip installed path
peri044 e847abd
chore : Fix dockerfile paths
peri044 d2cc1e9
fix(//py): Add new dirs to remove during clean
narendasan 7d67da2
refactor: Apply linting
narendasan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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/trtorch", | ||
includes = ["include/trtorch/"] | ||
) | ||
|
||
# Alias for ease of use | ||
cc_library( | ||
name = "trtorch", | ||
deps = [ | ||
":libtrtorch", | ||
] | ||
) |
This file contains hidden or 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" | ||
]) |
This file contains hidden or 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") |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did we not have to replace any of these dependencies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't get your question. We replaced
//cpp:trtorch
with//tests/util
which adds//cpp:trtorch
based on the trtorch_src flag