decord
decord copied to clipboard
Compile failed when using cuda
when i set -DUSE_CUDA=ON , some error occur:
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The CUDA compiler identification is NVIDIA 10.1.105
-- Check for working CUDA compiler: /home/tongzhan/cuda-10.1/bin/nvcc
-- Check for working CUDA compiler: /home/tongzhan/cuda-10.1/bin/nvcc - works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Performing Test SUPPORT_CXX11
-- Performing Test SUPPORT_CXX11 - Success
FFMPEG_INCLUDE_DIR = /home/tongzhan/anaconda3/envs/detectron2/include
FFMPEG_LIBRARIES = /home/tongzhan/anaconda3/envs/detectron2/lib/libavformat.so;/home/tongzhan/anaconda3/envs/detectron2/lib/libavfilter.so;/home/tongzhan/anaconda3/envs/detectron2/lib/libavcodec.so;/home/tongzhan/anaconda3/envs/detectron2/lib/libavutil.so
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA_TOOLKIT_ROOT_DIR=/home/tongzhan/cuda-10.1
-- Found CUDA_CUDA_LIBRARY=/home/tongzhan/cuda-10.1/targets/x86_64-linux/lib/stubs/libcuda.so
-- Found CUDA_CUDART_LIBRARY=/home/tongzhan/cuda-10.1/lib64/libcudart.so
-- Found CUDA_NVRTC_LIBRARY=/home/tongzhan/cuda-10.1/lib64/libnvrtc.so
-- Found CUDA_CUDNN_LIBRARY=/home/tongzhan/cuda-10.1/lib64/libcudnn.so
-- Found CUDA_CUBLAS_LIBRARY=/home/tongzhan/anaconda3/envs/detectron2/lib/libcublas.so
-- Found CUDA_NVIDIA_ML_LIBRARY=/home/tongzhan/cuda-10.1/targets/x86_64-linux/lib/stubs/libnvidia-ml.so
-- Found CUDA_NVCUVID_LIBRARY=/usr/lib/x86_64-linux-gnu/libnvcuvid.so
-- Build with CUDA support
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tongzhan/decord/build
All above might be successful, however when I make:
[ 85%] Building CXX object CMakeFiles/decord.dir/src/video/nvcodec/cuda_texture.cc.o
[ 88%] Building CXX object CMakeFiles/decord.dir/src/video/nvcodec/cuda_threaded_decoder.cc.o
[ 91%] Building CXX object CMakeFiles/decord.dir/src/runtime/cuda/cuda_device_api.cc.o
[ 94%] Building CXX object CMakeFiles/decord.dir/src/runtime/cuda/cuda_module.cc.o
[ 97%] Building CUDA object CMakeFiles/decord.dir/src/improc/improc.cu.o
/home/tongzhan/decord/src/improc/improc.cu(107): error: explicit type is missing ("int" assumed)
/home/tongzhan/decord/src/improc/improc.cu(108): error: explicit type is missing ("int" assumed)
/home/tongzhan/decord/src/improc/improc.cu(84): error: explicit type is missing ("int" assumed)
/home/tongzhan/decord/src/improc/improc.cu(86): error: explicit type is missing ("int" assumed)
/home/tongzhan/decord/src/improc/improc.cu(90): error: explicit type is missing ("int" assumed)
/home/tongzhan/decord/src/improc/improc.cu(90): error: no suitable conversion function from "float2" to "int" exists
/home/tongzhan/decord/src/improc/improc.cu(91): error: expression must have class type
/home/tongzhan/decord/src/improc/improc.cu(92): error: expression must have class type
/home/tongzhan/decord/src/improc/improc.cu(48): error: explicit type is missing ("int" assumed)
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(49): error: explicit type is missing ("int" assumed)
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(50): error: explicit type is missing ("int" assumed)
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(51): error: explicit type is missing ("int" assumed)
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(53): error: explicit type is missing ("int" assumed)
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(53): error: a reference of type "int &" (not const-qualified) cannot be initialized with a value of type "float [9]"
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(58): error: expression must have pointer-to-object type
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(58): error: expression must have pointer-to-object type
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(58): error: expression must have pointer-to-object type
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(59): error: expression must have pointer-to-object type
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(59): error: expression must have pointer-to-object type
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(59): error: expression must have pointer-to-object type
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(60): error: expression must have pointer-to-object type
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(60): error: expression must have pointer-to-object type
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(60): error: expression must have pointer-to-object type
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(62): error: expression must have pointer-to-object type
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(62): error: expression must have pointer-to-object type
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(62): error: expression must have pointer-to-object type
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(63): error: expression must have pointer-to-object type
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(63): error: expression must have pointer-to-object type
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(63): error: expression must have pointer-to-object type
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(64): error: expression must have pointer-to-object type
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(64): error: expression must have pointer-to-object type
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
/home/tongzhan/decord/src/improc/improc.cu(64): error: expression must have pointer-to-object type
detected during instantiation of "void decord::cuda::detail::process_frame_kernel(cudaTextureObject_t, cudaTextureObject_t, T *, uint16_t, uint16_t, uint16_t, uint16_t, float, float) [with T=uint8_t]"
(113): here
32 errors detected in the compilation of "/tmp/tmpxft_0000a248_00000000-6_improc.cpp1.ii".
make[2]: *** [CMakeFiles/decord.dir/build.make:509: CMakeFiles/decord.dir/src/improc/improc.cu.o] Error 1
make[2]: Leaving directory '/home/tongzhan/decord/build'
make[1]: *** [CMakeFiles/Makefile2:93: CMakeFiles/decord.dir/all] Error 2
make[1]: Leaving directory '/home/tongzhan/decord/build'
make: *** [Makefile:147: all] Error 2
I first meet error as #65 so I erase the '-std=c++11' in line 62, CMakeLists.txt as him, then the error above occur.
CUDA 10.1 V10.1.105

@zhreshold
@yztongzhan I will take a look first
@yztongzhan it appears that your gcc version is 5.4.0, I am not sure if it's relevant but please pull the latest master with: e676a688e6c7fd49797866102d3388fe72b5d4fd