Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google colab cmake error #290

Open
temirlanzzz opened this issue Jun 12, 2022 · 1 comment
Open

Google colab cmake error #290

temirlanzzz opened this issue Jun 12, 2022 · 1 comment

Comments

@temirlanzzz
Copy link

I am trying to run this on Google Colab, however cmake returns this error:
-- CUDA Architecture: -arch=sm_75
-- CUDA Version: 11.1
-- 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: /content/tkdnn/build
Consolidate compiler generated dependencies of target kernels
[ 21%] Built target kernels
Consolidate compiler generated dependencies of target tkDNN
[ 21%] Building CXX object CMakeFiles/tkDNN.dir/src/Int8BatchStream.cpp.o
/content/tkdnn/src/Int8BatchStream.cpp:4:10: fatal error: opencv2/dnn/dnn.hpp: No such file or directory
#include <opencv2/dnn/dnn.hpp>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/tkDNN.dir/build.make:215: recipe for target 'CMakeFiles/tkDNN.dir/src/Int8BatchStream.cpp.o' failed
make[2]: *** [CMakeFiles/tkDNN.dir/src/Int8BatchStream.cpp.o] Error 1
CMakeFiles/Makefile2:214: recipe for target 'CMakeFiles/tkDNN.dir/all' failed
make[1]: *** [CMakeFiles/tkDNN.dir/all] Error 2
Makefile:135: recipe for target 'all' failed
make: *** [all] Error 2

I have installed tensorrt using pip:
!pip install --upgrade --index-url https://pypi.ngc.nvidia.com nvidia-tensorrt==8.2.5.1
and it seems to install correctly:
import tensorrt as trt
trt.version
returns: 8.2.5.1
Could you provide a guide on running this on Google Colab? Seems like I am missing something in installation.

@ceccocats
Copy link
Owner

tkDNN require opencv compled with dnn module, but is only for that Int8batchStream file.
If you cant install opencv with dnn module just comment these lines:

#include <opencv2/dnn/dnn.hpp>

m_LetterboxImage = cv::dnn::blobFromImage(m_LetterboxImage);

res.assign(m_LetterboxImage.begin<float>(), m_LetterboxImage.end<float>());

of course int8 will not work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants