Skip to content

Commit

Permalink
Added TensorRT v8.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
stemann committed Jan 31, 2022
1 parent 01620e1 commit 699f3f9
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 0 deletions.
8 changes: 8 additions & 0 deletions T/TensorRT/build_10.2.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
platforms_and_sources = Dict(
Platform("x86_64", "linux") => [
ArchiveSource("https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/8.0.1/tars/tensorrt-8.0.1.6.linux.x86_64-gnu.cuda-10.2.cudnn8.2.tar.gz",
"110bbfd69fe27e298e1ad1bc35300569069ffeb8b691f48bcaf34703e1bafb96")],
Platform("x86_64", "windows") => [
ArchiveSource("https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/8.0.1/zip/tensorrt-8.0.1.6.windows10.x86_64.cuda-10.2.cudnn8.2.zip",
"003cd632d978205de8b3140da743a9d39647ccb9959a1c219d34201d75a0a49e")],
)
1 change: 1 addition & 0 deletions T/TensorRT/build_11.0.jl
1 change: 1 addition & 0 deletions T/TensorRT/build_11.1.jl
1 change: 1 addition & 0 deletions T/TensorRT/build_11.2.jl
1 change: 1 addition & 0 deletions T/TensorRT/build_11.3.jl
14 changes: 14 additions & 0 deletions T/TensorRT/build_11.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
platforms_and_sources = Dict(
Platform("x86_64", "linux") => [
ArchiveSource("https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/8.0.1/tars/tensorrt-8.0.1.6.linux.x86_64-gnu.cuda-11.3.cudnn8.2.tar.gz",
"def6a5ee50bed25a68a9c9e22ec671a8f29ee5414bde47c5767bd279e5596f88")],
Platform("ppc64le", "linux") => [
ArchiveSource("https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/8.0.1/tars/tensorrt-8.0.1.6.centos-8.3.ppc64le-gnu.cuda-11.3.cudnn8.2.tar.gz",
"fd33a32085c468f638505e2603936fa4e3f2a3fa46989570fa0b9e31a9e6914a")],
Platform("aarch64", "linux") => [
ArchiveSource("https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/8.0.1/tars/tensorrt-8.0.1.6.ubuntu-20.04.aarch64-gnu.cuda-11.3.cudnn8.2.tar.gz",
"ea322da72b1b1ca6b8d0715ab14668c54f7d00ad22695d41a85a7055df9f63e1")],
Platform("x86_64", "windows") => [
ArchiveSource("https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/8.0.1/zip/tensorrt-8.0.1.6.windows10.x86_64.cuda-11.3.cudnn8.2.zip",
"e51b382e931ae9032e431fff218cd2cf2d2b7a7c66c7a6bdf453557612466ae1")],
)
55 changes: 55 additions & 0 deletions T/TensorRT/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using BinaryBuilder, Pkg
using Base.BinaryPlatforms: arch, os

include("../../fancy_toys.jl")

name = "TensorRT"
version = v"8.0.1"

script = raw"""
mkdir -p ${bindir} ${libdir} ${includedir}
cd ${WORKSPACE}/srcdir
cd TensorRT*
mv bin/* ${bindir}
mv include/* ${includedir}
mv lib/*.${dlext}* ${libdir}
if [[ ${target} == x86_64-w64-mingw32 ]]; then
chmod +x ${bindir}/*.{dll,exe}
install_license doc/TensorRT-SLA.pdf
else
install_license doc/pdf/TensorRT-SLA.pdf
fi
"""

lib_names = [
"nvinfer",
"nvinfer_builder_resource",
"nvinfer_plugin",
"nvonnxparser",
"nvparsers"
]

products = vcat(
[LibraryProduct(["lib" * lib_name, lib_name], Symbol("lib" * lib_name)) for lib_name in lib_names],
[ExecutableProduct("trtexec", :trtexec)]
)

dependencies = [Dependency("CUDNN_jll")]

cuda_versions = [v"10.2", v"11.0", v"11.1", v"11.2", v"11.3"]
for cuda_version in cuda_versions
cuda_tag = "$(cuda_version.major).$(cuda_version.minor)"
include("build_$(cuda_tag).jl")

for (platform, sources) in platforms_and_sources
augmented_platform = Platform(arch(platform), os(platform); cuda=cuda_tag)
should_build_platform(triplet(augmented_platform)) || continue
arch(platform) == "x86_64" || cuda_version == v"11.3" || continue # Non-x86_64 archs ARM and Power only support CUDA 11.3
build_tarballs(ARGS, name, version, sources, script, [augmented_platform],
products, dependencies; lazy_artifacts=true)
end
end

0 comments on commit 699f3f9

Please sign in to comment.