Compile error on tensorrt8 branch #276
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ubuntu 20.04
Cuda 11.5
CudNN 8.3.1
TensorRT 8.2.2
OpenCV 4.52
Workflow as defined in README.md leads to the following error:
In case I explicitly say what build type I want all works perfectly:
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
I also face the same problem with the tensorrt8 branch. Actually, the error messages are different if compiling with the master branch.
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 you dont want to define the build type then append
-fPICtoCMAKE_CXX_FLAGSsimilar to what is there on the master branch https://github.com/ceccocats/tkDNN/blob/04de9908a68588c32dcf94d84b59fdf71cf8d9a8/CMakeLists.txt#L6Unfortunately, the "-fPIC" is already in my CMakeList.txt. Any other ideas? Thanks a lot.
I meant doing something like this
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
It works. Thank you.