summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2020-07-26 19:32:10 +0000
committerDaniel Bermond2020-07-26 19:32:10 +0000
commitb810be964f646ab73f3e987c035e31f6dafc95d7 (patch)
treec33c49dfcc562945387b214246dc012012cc5a05
parent931a86f254071219a20ab49e3036ba7296c77551 (diff)
downloadaur-b810be964f646ab73f3e987c035e31f6dafc95d7.tar.gz
Fix cub deprecation huge warnings. Use patch for local protobuf.
-rw-r--r--.SRCINFO10
-rw-r--r--010-tensorrt-protobuf-fix-cub-deprecation-warnings.patch11
-rw-r--r--010-tensorrt-use-local-protobuf-sources.patch11
-rw-r--r--020-tensorrt-fix-cub-deprecation-huge-warnings.patch20
-rw-r--r--PKGBUILD14
5 files changed, 45 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index be1090ded6e7..a5a11929b2b1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,17 @@
pkgbase = tensorrt
pkgdesc = A platform for high-performance deep learning inference using NVIDIA hardware
pkgver = 7.1.3.4
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/NVIDIA/TensorRT/
arch = x86_64
license = custom
license = Apache
makedepends = git
makedepends = cmake
+ makedepends = poppler
makedepends = pybind11
makedepends = python
makedepends = python-pip
- makedepends = poppler
makedepends = cuda
makedepends = cudnn
noextract = protobuf-cpp-3.12.3.tar.gz
@@ -24,7 +24,8 @@ pkgbase = tensorrt
source = git+https://github.com/pybind/pybind11
source = git+https://github.com/google/benchmark
source = https://github.com/google/protobuf/releases/download/v3.12.3/protobuf-cpp-3.12.3.tar.gz
- source = 010-tensorrt-protobuf-fix-cub-deprecation-warnings.patch
+ source = 010-tensorrt-use-local-protobuf-sources.patch
+ source = 020-tensorrt-fix-cub-deprecation-huge-warnings.patch
sha256sums = f13c6e2f82fda1ed3becac6230ec2048764fe8d302b20a29ae3b1e280c7aac69
sha256sums = SKIP
sha256sums = SKIP
@@ -34,7 +35,8 @@ pkgbase = tensorrt
sha256sums = SKIP
sha256sums = SKIP
sha256sums = 4ef97ec6a8e0570d22ad8c57c99d2055a61ea2643b8e1a0998d2c844916c4968
- sha256sums = 391f0f5f1fbb3ed19319c8a47e04aee071a938ed4f2942263eff9c1385019f31
+ sha256sums = ea25bb1b188d53cbfbec35d242ab2a2fa8d6009c547c9f5f67bc2f1ad127ceac
+ sha256sums = bfc2230de7d1afa97febd2bc74c0cca019d86c303008533c347c18c20dea5cd7
pkgname = tensorrt
depends = cuda
diff --git a/010-tensorrt-protobuf-fix-cub-deprecation-warnings.patch b/010-tensorrt-protobuf-fix-cub-deprecation-warnings.patch
deleted file mode 100644
index c22cb6f522a3..000000000000
--- a/010-tensorrt-protobuf-fix-cub-deprecation-warnings.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/third_party/protobuf.cmake
-+++ b/third_party/protobuf.cmake
-@@ -24,7 +24,7 @@ macro(configure_protobuf VERSION)
- set(Protobuf_TARGET third_party.protobuf)
-
- set(PROTOBUF_CFLAGS "-Dgoogle=google_private")
-- set(PROTOBUF_CXXFLAGS "-Dgoogle=google_private")
-+ set(PROTOBUF_CXXFLAGS "-Dgoogle=google_private -std=c++14")
-
- ExternalProject_Add(${Protobuf_TARGET}
- PREFIX ${Protobuf_TARGET}
diff --git a/010-tensorrt-use-local-protobuf-sources.patch b/010-tensorrt-use-local-protobuf-sources.patch
new file mode 100644
index 000000000000..5e3860c6cacc
--- /dev/null
+++ b/010-tensorrt-use-local-protobuf-sources.patch
@@ -0,0 +1,11 @@
+--- a/third_party/protobuf.cmake
++++ b/third_party/protobuf.cmake
+@@ -19,7 +19,7 @@ include(ExternalProject)
+ # with the include dir and binaries imported
+ macro(configure_protobuf VERSION)
+ set(protobufPackage "protobuf-cpp-${VERSION}.tar.gz")
+- set(Protobuf_PKG_URL "https://github.com/google/protobuf/releases/download/v${VERSION}/${protobufPackage}")
++ set(Protobuf_PKG_URL "./protobuf-cpp-${VERSION}.tar.gz")
+ set(Protobuf_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR})
+ set(Protobuf_TARGET third_party.protobuf)
+
diff --git a/020-tensorrt-fix-cub-deprecation-huge-warnings.patch b/020-tensorrt-fix-cub-deprecation-huge-warnings.patch
new file mode 100644
index 000000000000..f05bf5473b92
--- /dev/null
+++ b/020-tensorrt-fix-cub-deprecation-huge-warnings.patch
@@ -0,0 +1,20 @@
+--- a/plugin/CMakeLists.txt
++++ b/plugin/CMakeLists.txt
+@@ -118,7 +118,7 @@ set_target_properties(${SHARED_TARGET} PROPERTIES DEBUG_POSTFIX ${TRT_DEBUG_POST
+
+ set_target_properties(${SHARED_TARGET} PROPERTIES VERSION ${TRT_VERSION} SOVERSION ${TRT_SOVERSION} )
+
+-set_property(TARGET ${SHARED_TARGET} PROPERTY CUDA_STANDARD 11)
++set_property(TARGET ${SHARED_TARGET} PROPERTY CUDA_STANDARD 14)
+
+ target_link_libraries(${SHARED_TARGET}
+ ${CUBLAS_LIB}
+@@ -158,7 +158,7 @@ set_target_properties(${STATIC_TARGET} PROPERTIES DEBUG_POSTFIX ${TRT_DEBUG_POST
+
+ set_target_properties(${STATIC_TARGET} PROPERTIES VERSION ${TRT_VERSION} SOVERSION ${TRT_SOVERSION} )
+
+-set_property(TARGET ${STATIC_TARGET} PROPERTY CUDA_STANDARD 11)
++set_property(TARGET ${STATIC_TARGET} PROPERTY CUDA_STANDARD 14)
+
+ #########################################################################################
+
diff --git a/PKGBUILD b/PKGBUILD
index fd28fe121c16..cf27d2181ca5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -22,12 +22,12 @@ _onnx_ver=1.7.0
pkgbase=tensorrt
pkgname=('tensorrt' 'tensorrt-doc')
pkgver=7.1.3.4
-pkgrel=1
+pkgrel=2
pkgdesc='A platform for high-performance deep learning inference using NVIDIA hardware'
arch=('x86_64')
url='https://github.com/NVIDIA/TensorRT/'
license=('custom' 'Apache')
-makedepends=('git' 'cmake' 'pybind11' 'python' 'python-pip' 'poppler'
+makedepends=('git' 'cmake' 'poppler' 'pybind11' 'python' 'python-pip'
'cuda' 'cudnn')
source=("local://TensorRT-${pkgver}.Ubuntu-${_ubuntuver}.${CARCH}-gnu.cuda-${_cudaver}.cudnn${_cudnnver}.tar.gz"
"git+https://github.com/NVIDIA/TensorRT.git#tag=${pkgver%.*}"
@@ -38,7 +38,8 @@ source=("local://TensorRT-${pkgver}.Ubuntu-${_ubuntuver}.${CARCH}-gnu.cuda-${_cu
'git+https://github.com/pybind/pybind11'
'git+https://github.com/google/benchmark'
"https://github.com/google/protobuf/releases/download/v${_protobuf_ver}/protobuf-cpp-${_protobuf_ver}.tar.gz"
- '010-tensorrt-protobuf-fix-cub-deprecation-warnings.patch')
+ '010-tensorrt-use-local-protobuf-sources.patch'
+ '020-tensorrt-fix-cub-deprecation-huge-warnings.patch')
noextract=("protobuf-cpp-${_protobuf_ver}.tar.gz")
sha256sums=('f13c6e2f82fda1ed3becac6230ec2048764fe8d302b20a29ae3b1e280c7aac69'
'SKIP'
@@ -49,7 +50,8 @@ sha256sums=('f13c6e2f82fda1ed3becac6230ec2048764fe8d302b20a29ae3b1e280c7aac69'
'SKIP'
'SKIP'
'4ef97ec6a8e0570d22ad8c57c99d2055a61ea2643b8e1a0998d2c844916c4968'
- '391f0f5f1fbb3ed19319c8a47e04aee071a938ed4f2942263eff9c1385019f31')
+ 'ea25bb1b188d53cbfbec35d242ab2a2fa8d6009c547c9f5f67bc2f1ad127ceac'
+ 'bfc2230de7d1afa97febd2bc74c0cca019d86c303008533c347c18c20dea5cd7')
prepare() {
# tensorrt git submodules
@@ -79,9 +81,9 @@ prepare() {
# protobuf
mkdir -p build/third_party.protobuf/src
cp -a "protobuf-cpp-${_protobuf_ver}.tar.gz" build/third_party.protobuf/src
- sed -i "/Protobuf_PKG_URL/s|\\\"https.*\\\"|\\\"./protobuf-cpp-\${VERSION}.tar.gz\\\"|" TensorRT/third_party/protobuf.cmake
- patch -d TensorRT -Np1 -i "${srcdir}/010-tensorrt-protobuf-fix-cub-deprecation-warnings.patch"
+ patch -d TensorRT -Np1 -i "${srcdir}/010-tensorrt-use-local-protobuf-sources.patch"
+ patch -d TensorRT -Np1 -i "${srcdir}/020-tensorrt-fix-cub-deprecation-huge-warnings.patch"
pdftotext -layout "TensorRT-${pkgver}/doc/pdf/TensorRT-SLA.pdf"
}