Skip to content

Commit

Permalink
Merge pull request #22 from mstallmo/trt-plugins
Browse files Browse the repository at this point in the history
Add support for loading built in TensorRT plugins
  • Loading branch information
mstallmo authored Sep 26, 2020
2 parents 2565b27 + 4ab2014 commit 4d4e35d
Show file tree
Hide file tree
Showing 30 changed files with 601 additions and 300 deletions.
3 changes: 0 additions & 3 deletions .gitattributes

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
Cargo.lock
**/cmake-build-debug
.idea
*.engine
*.engine
assets/
Binary file removed assets/images/0.pgm
Binary file not shown.
Binary file removed assets/images/1.pgm
Binary file not shown.
Binary file removed assets/lenet5.uff
Binary file not shown.
Binary file modified tensorrt-sys/3rdParty/TensorRT-5.1.5/libnvinfer_plugin_static.a
Binary file not shown.
3 changes: 0 additions & 3 deletions tensorrt-sys/3rdParty/TensorRT-5.1.5/libnvinfer_static.a

This file was deleted.

3 changes: 0 additions & 3 deletions tensorrt-sys/3rdParty/TensorRT-5.1.5/libnvparsers_static.a

This file was deleted.

2 changes: 1 addition & 1 deletion tensorrt-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tensorrt-sys"
version = "0.2.1"
version = "0.3.0"
authors = ["Mason Stallmo <[email protected]>"]
license = "MIT"
edition = "2018"
Expand Down
6 changes: 5 additions & 1 deletion tensorrt-sys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CMake > 3.10


TensorRT-sys' bindings depends on TensorRT 5.1.5 for the bindings to work correctly. While other versions of
TensorRT *may* work with the bindings there are no guarantees as functions that are boudn to may have been depricated,
TensorRT *may* work with the bindings there are no guarantees as functions that are bound to may have been depricated,
removed, or changed in future versions of TensorRT.

The prerequisites enumerated above are expected to be installed in their default location on Linux. See the [nvidia
Expand All @@ -27,6 +27,10 @@ further install information.
__Note:__ The tarball installation method described in the TesnorRT documentation is likely to cause major headaches with
getting everything to link correctly. It is highly recommended to use the package manager method if possible.

If there are issues with loading default TensoRT plugins it seems that there are some missing plugins that were not
provided with the 5.1.5 binary installation at one point in time. To get these plugins follow the instructions for building
and installing the TensorRT OSS components from [here](https://github.com/NVIDIA/TensorRT).

Windows support is not currently supported but should be coming soon!

### Support Matrix for TensorRT Classes
Expand Down
26 changes: 13 additions & 13 deletions tensorrt-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,18 @@ fn main() {
println!("cargo:rustc-flags=-l dylib=stdc++");

match get_shared_lib_link_path("libnvinfer") {
Some(link_path) => {
match std::fs::read_link(link_path) {
Ok(full_library_path) => {
configuration(&full_library_path);
},
Err(_) => {
panic!("libnvinfer.so not found! See https://docs.nvidia.com/deeplearning/tensorrt/archives/tensorrt-515/tensorrt-install-guide/index.html for install instructions");
}
}
},
None => {
panic!("libnvinfer.so not found! See https://docs.nvidia.com/deeplearning/tensorrt/archives/tensorrt-515/tensorrt-install-guide/index.html for install instructions");
}
Some(link_path) => {
match std::fs::read_link(link_path) {
Ok(full_library_path) => {
configuration(&full_library_path);
}
Err(_) => {
panic!("libnvinfer.so not found! See https://docs.nvidia.com/deeplearning/tensorrt/archives/tensorrt-515/tensorrt-install-guide/index.html for install instructions");
}
}
}
None => {
panic!("libnvinfer.so not found! See https://docs.nvidia.com/deeplearning/tensorrt/archives/tensorrt-515/tensorrt-install-guide/index.html for install instructions");
}
}
}
Loading

0 comments on commit 4d4e35d

Please sign in to comment.