Comments (6)
I believe its mentioned on the readme of the tensorrt8 branch to define build type https://github.com/ceccocats/tkDNN/tree/tensorrt8#how-to-compile-this-repo
from tkdnn.
I also face the same problem with the tensorrt8 branch. Actually, the error messages are different if compiling with the master branch.
root@314654f59059:~/tkDNN# git checkout tensorrt8
Branch 'tensorrt8' set up to track remote branch 'tensorrt8' from 'origin'.
Switched to a new branch 'tensorrt8'
root@314654f59059:~/tkDNN# git status
On branch tensorrt8
Your branch is up to date with 'origin/tensorrt8'.
nothing to commit, working tree clean
root@314654f59059:~/tkDNN/build# cmake ..
-- CUDA Architecture: -arch=sm_86
-- CUDA Version: 11.4
-- CUDA Path: /usr/local/cuda
-- CUDA Libararies: /usr/local/cuda/lib64/libcudart_static.a;Threads::Threads;dl;/usr/lib/x86_64-linux-gnu/librt.so
-- CUDA Performance Primitives: /usr/local/cuda/lib64/libnppc.so;/usr/local/cuda/lib64/libnppial.so;/usr/local/cuda/lib64/libnppicc.so;;/usr/local/cuda/lib64/libnppidei.so;/usr/local/cuda/lib64/libnppif.so;/usr/local/cuda/lib64/libnppig.so;/usr/local/cuda/lib64/libnppim.so;/usr/local/cuda/lib64/libnppist.so;/usr/local/cuda/lib64/libnppisu.so;/usr/local/cuda/lib64/libnppitc.so;/usr/local/cuda/lib64/libnpps.so
-- Found CUDNN: /usr/lib/x86_64-linux-gnu/libcudnn.so
-- Found CUDNN include: /usr/include
-- Found NVINFER: /usr/lib/x86_64-linux-gnu/libnvinfer.so
-- Found NVINFER include: /usr/include/x86_64-linux-gnu
Eigen DIR: /usr/include/eigen3
install dir:/usr/local
-- Configuring done
-- Generating done
-- Build files have been written to: /root/tkDNN/build
root@314654f59059:~/tkDNN/build# make -j6
[ 0%] Building NVCC (Device) object CMakeFiles/kernels.dir/src/kernels/kernels_generated_upsample.cu.o
[ 1%] Building NVCC (Device) object CMakeFiles/kernels.dir/src/kernels/kernels_generated_activation_elu.cu.o
[ 1%] Building NVCC (Device) object CMakeFiles/kernels.dir/src/kernels/kernels_generated_activation_leaky.cu.o
[ 2%] Building NVCC (Device) object CMakeFiles/kernels.dir/src/kernels/kernels_generated_activation_logistic.cu.o
[ 3%] Building NVCC (Device) object CMakeFiles/kernels.dir/src/kernels/kernels_generated_activation_mish.cu.o
[ 3%] Building NVCC (Device) object CMakeFiles/kernels.dir/src/kernels/kernels_generated_activation_relu_ceiling.cu.o
[ 4%] Building NVCC (Device) object CMakeFiles/kernels.dir/src/kernels/kernels_generated_activation_sigmoid.cu.o
[ 4%] Building NVCC (Device) object CMakeFiles/kernels.dir/src/kernels/kernels_generated_convert.cu.o
[ 5%] Building NVCC (Device) object CMakeFiles/kernels.dir/src/kernels/kernels_generated_deformable_conv.cu.o
[ 6%] Building NVCC (Device) object CMakeFiles/kernels.dir/src/kernels/kernels_generated_fill.cu.o
[ 6%] Building NVCC (Device) object CMakeFiles/kernels.dir/src/kernels/kernels_generated_normalize.cu.o
[ 7%] Building NVCC (Device) object CMakeFiles/kernels.dir/src/kernels/kernels_generated_pooling.cu.o
[ 7%] Building NVCC (Device) object CMakeFiles/kernels.dir/src/kernels/kernels_generated_postprocessing.cu.o
[ 8%] Building NVCC (Device) object CMakeFiles/kernels.dir/src/kernels/kernels_generated_reorg.cu.o
[ 9%] Building NVCC (Device) object CMakeFiles/kernels.dir/src/kernels/kernels_generated_resize.cu.o
[ 9%] Building NVCC (Device) object CMakeFiles/kernels.dir/src/kernels/kernels_generated_scaladd.cu.o
[ 10%] Building NVCC (Device) object CMakeFiles/kernels.dir/src/kernels/kernels_generated_shortcut.cu.o
[ 11%] Building NVCC (Device) object CMakeFiles/kernels.dir/src/kernels/kernels_generated_softmax.cu.o
[ 12%] Building NVCC intermediate link file CMakeFiles/kernels.dir/kernels_intermediate_link.o
[ 13%] Building CXX object CMakeFiles/kernels.dir/src/pluginsRT/ActivationLeakyRT.cpp.o
[ 14%] Building CXX object CMakeFiles/kernels.dir/src/pluginsRT/ActivationLogisticRT.cpp.o
[ 14%] Building CXX object CMakeFiles/kernels.dir/src/pluginsRT/ActivationMishRT.cpp.o
[ 14%] Building CXX object CMakeFiles/kernels.dir/src/pluginsRT/ActivationReLUCeilingRT.cpp.o
[ 15%] Building CXX object CMakeFiles/kernels.dir/src/pluginsRT/DeformableConvRT.cpp.o
[ 15%] Building CXX object CMakeFiles/kernels.dir/src/pluginsRT/FlattenConcatRT.cpp.o
[ 16%] Building CXX object CMakeFiles/kernels.dir/src/pluginsRT/MaxPoolingSizeRT.cpp.o
[ 17%] Building CXX object CMakeFiles/kernels.dir/src/pluginsRT/RegionRT.cpp.o
[ 17%] Building CXX object CMakeFiles/kernels.dir/src/pluginsRT/ReorgRT.cpp.o
[ 18%] Building CXX object CMakeFiles/kernels.dir/src/pluginsRT/ReshapeRT.cpp.o
[ 18%] Building CXX object CMakeFiles/kernels.dir/src/pluginsRT/ResizeLayerRT.cpp.o
[ 19%] Building CXX object CMakeFiles/kernels.dir/src/pluginsRT/RouteRT.cpp.o
[ 20%] Building CXX object CMakeFiles/kernels.dir/src/pluginsRT/ShortcutRT.cpp.o
[ 20%] Building CXX object CMakeFiles/kernels.dir/src/pluginsRT/UpsampleRT.cpp.o
[ 21%] Building CXX object CMakeFiles/kernels.dir/src/pluginsRT/YoloRT.cpp.o
[ 22%] Linking CXX shared library libkernels.so
/usr/bin/ld: CMakeFiles/kernels.dir/kernels_intermediate_link.o: relocation R_X86_64_PC32 against symbol `__fatbinwrap_49_tmpxft_000003f0_00000000_7_activation_elu_cpp1_ii_d406a46e' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/kernels.dir/build.make:5477: libkernels.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:179: CMakeFiles/kernels.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
from tkdnn.
If you define the build type it should resolve your issue,
tkDNN on tensorrt8 branches has its flags split into debug and release as shown below
if(UNIX)
if(CMAKE_BUILD_TYPE MATCHES Release)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wno-deprecated-declarations -Wno-unused-variable -O3")
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} --maxrregcount=32)
endif()
if(CMAKE_BUILD_TYPE MATCHES Debug)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wno-deprecated-declarations -Wno-unused-variable -g3")
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} --maxrregcount=32 -G -g)
endif()
endif()
if you dont want to define the build type then append -fPIC
to CMAKE_CXX_FLAGS
similar to what is there on the master branch
Line 6 in 04de990
from tkdnn.
Unfortunately, the "-fPIC" is already in my CMakeList.txt. Any other ideas? Thanks a lot.
38 if(UNIX)
39 if(CMAKE_BUILD_TYPE MATCHES Release)
40 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wno-deprecated-declarations -Wno-unused-variable -O3")
41 set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} --maxrregcount=32)
42 endif()
43
44 if(CMAKE_BUILD_TYPE MATCHES Debug)
45 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wno-deprecated-declarations -Wno-unused-variable -g3")
46 set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} --maxrregcount=32 -G -g)
47 endif()
48 endif()
from tkdnn.
I meant doing something like this
if(UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
if(CMAKE_BUILD_TYPE MATCHES Release)
....
endif()
Since the CMakeList.txt you are using currently ,needs a build type to be defined for -fPIC , moving the -fPIC definition to just above the individual build type definitions should do the trick in case no build type is defined
from tkdnn.
It works. Thank you.
from tkdnn.
Related Issues (20)
- yolo object detection on images HOT 2
- Large GPU memory consumption on Tensorrt8 branch
- terminate called after throwing an instance of 'YAML::ParserException'
- How to serialize yolov4 with 608 on a jetson nano? HOT 1
- CUDNN failure: CUDNN_STATUS_NOT_INITIALIZED HOT 1
- reach max boxes HOT 1
- Any updates if it works with new versions of CUDNN? HOT 6
- terminate called after throwing an instance of 'YAML::ParserException' HOT 3
- Build error window HOT 4
- cloud not build cuda engine HOT 2
- Google colab cmake error HOT 1
- not matching Darknet HOT 1
- YOLO v7 Support HOT 7
- How to interface with python Torchrt models? HOT 1
- centernet3d and centertrack3d, too many inferences results showing! HOT 5
- TkDnn vs OpenCv Dnn
- monodepth2 download HOT 3
- Yolo3Detection segfault on cv::resize - Jetpack 5.0 HOT 3
- Problems with custom dataset and tensorrt8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tkdnn.