opencv / opencv_contrib

Repository for OpenCV's extra modules
Apache License 2.0
9.19k stars 5.74k forks source link

error: no instance of overloaded function "cv::cudev::blockReduce" matches the argument list #3728

Closed jiapei100 closed 1 month ago

jiapei100 commented 2 months ago
System information (version)
Detailed description
Steps to reproduce

Just trying to build OpenCV-5.x with OpenCV_contrib-5.x, and I got the following ERROR messages:

....../opencv_contrib/modules/cudev/include/opencv2/cudev/grid/detail/reduce.hpp(385): error: no instance of overloaded function "cv::cudev::blockReduce" matches the argument list
            argument types are: (cuda::std::__4::tuple<volatile int *, volatile int *>, cuda::std::__4::tuple<int &, int &>, int, cuda::std::__4::tuple<cv::cudev::minimum<int>, cv::cudev::maximum<int>>)
              blockReduce<BLOCK_SIZE, volatile double *, double, cv::cudev::minimum<double>, cv::cudev::maximum<double>>(smem_tuple(sminval, smaxval), tie(mymin, mymax), tid, make_tuple(minOp, maxOp));
              ^
....../opencv_contrib/modules/cudev/include/opencv2/cudev/block/reduce.hpp(72): note #3327-D: candidate function template "cv::cudev::blockReduce<N,P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,R0,R1,R2,R3,R4,R5,R6,R7,R8,R9,Op0,Op1,Op2,Op3,Op4,Op5,Op6,Op7,Op8,Op9>(const thrust::THRUST_200302_800_860_NS::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> &, const thrust::THRUST_200302_800_860_NS::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9> &, uint, const thrust::THRUST_200302_800_860_NS::tuple<Op0, Op1, Op2, Op3, Op4, Op5, Op6, Op7, Op8, Op9> &)" failed deduction
  __attribute__((device)) __inline__ __attribute__((always_inline)) void blockReduce(const tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>& smem,
                                                                         ^
....../opencv_contrib/modules/cudev/include/opencv2/cudev/block/reduce.hpp(63): note #3323-D: substituting explicit template arguments "<<expression>, volatile double *, double, cv::cudev::minimum<double>, cv::cudev::maximum<double>>" for function template "cv::cudev::blockReduce<N,T,Op>(volatile T *, T &, uint, const Op &)" failed
  __attribute__((device)) __inline__ __attribute__((always_inline)) void blockReduce(volatile T* smem, T& val, uint tid, const Op& op)
Issue submission checklist
LaurentBerger commented 2 months ago

Is it really an issue? Did you check the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution ? What is your configuration? please nobody can help you without configuration. Post your cmake output.

cudawarped commented 2 months ago

Is it really an issue?

Actually its a combination of two issues

1) an inability to search https://github.com/search?q=repo%3Aopencv%2Fopencv_contrib+blockReduce%3CBLOCK_SIZE&type=issues and

2) an existing issue (https://github.com/opencv/opencv_contrib/issues/3690)

jiapei100 commented 1 month ago

@cudawarped

Is this working with CUDA-12.3 ?

cudawarped commented 1 month ago

@cudawarped

Is this working with CUDA-12.3 ?

Yes everything works with CUDA 12.3 and cuDNN 8.9.7.

jiapei100 commented 1 month ago

@cudawarped

The official release of 4.9.0? Or git version?

I don't know why I still have this issue:

....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/detail/reduce.hpp(379): error: no instance of overloaded function "cv::cudev::blockReduce" matches the argument list
            argument types are: (thrust::THRUST_200500_800_860_NS::tuple<volatile int *, volatile int *>, thrust::THRUST_200500_800_860_NS::tuple<int &, int &>, int, thrust::THRUST_200500_800_860_NS::tuple<cv::cudev::minimum<int>, cv::cudev::maximum<int>>)
              blockReduce<BLOCK_SIZE>(smem_tuple(sminval, smaxval), tie(mymin, mymax), tid, make_tuple(minOp, maxOp));
              ^
          detected during:
            instantiation of "void cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, src_type, work_type>::reduceGrid<BLOCK_SIZE>(work_type *, int) [with src_type=uchar, work_type=int, BLOCK_SIZE=256]" at line 412
            instantiation of "void cv::cudev::grid_reduce_detail::reduce<Reductor,BLOCK_SIZE,PATCH_X,PATCH_Y,SrcPtr,ResType,MaskPtr>(SrcPtr, ResType *, MaskPtr, int, int) [with Reductor=cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, uchar, int>, BLOCK_SIZE=256, PATCH_X=4, PATCH_Y=4, SrcPtr=cv::cudev::GlobPtr<uchar>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 421
            instantiation of "void cv::cudev::grid_reduce_detail::reduce<Reductor,Policy,SrcPtr,ResType,MaskPtr>(const SrcPtr &, ResType *, const MaskPtr &, int, int, cudaStream_t) [with Reductor=cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, uchar, int>, Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GlobPtr<uchar>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 460
            instantiation of "void cv::cudev::grid_reduce_detail::minMaxVal<Policy,SrcPtr,ResType,MaskPtr>(const SrcPtr &, ResType *, const MaskPtr &, int, int, cudaStream_t) [with Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GlobPtr<uchar>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 206 of ....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/reduce.hpp
            instantiation of "void cv::cudev::gridFindMinMaxVal_<Policy,SrcPtr,ResType>(const SrcPtr &, cv::cudev::GpuMat_<ResType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GpuMat_<uchar>, ResType=int]" at line 349 of ....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/reduce.hpp
            instantiation of "void cv::cudev::gridFindMinMaxVal(const SrcPtr &, cv::cudev::GpuMat_<ResType> &, cv::cuda::Stream &) [with SrcPtr=cv::cudev::GpuMat_<uchar>, ResType=int]" at line 68 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu
            instantiation of "void <unnamed>::minMaxImpl<T,R>(const cv::cuda::GpuMat &, const cv::cuda::GpuMat &, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=uchar, R=int]" at line 92 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu

....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/detail/reduce.hpp(379): error: no instance of overloaded function "cv::cudev::blockReduce" matches the argument list
            argument types are: (thrust::THRUST_200500_800_860_NS::tuple<volatile int *, volatile int *>, thrust::THRUST_200500_800_860_NS::tuple<int &, int &>, int, thrust::THRUST_200500_800_860_NS::tuple<cv::cudev::minimum<int>, cv::cudev::maximum<int>>)
              blockReduce<BLOCK_SIZE>(smem_tuple(sminval, smaxval), tie(mymin, mymax), tid, make_tuple(minOp, maxOp));
              ^
          detected during:

And I now guarantee I'm using cudnn-8.9.7 with cuda-12.3.2

jiapei100 commented 1 month ago

@cudawarped

I guess it may have something to do with both CUDA version and GCC version. As for CUDNN, I stick to 8.9.7.

Since I'm now using Ubuntu-24.04, by default, it comes with gcc-13.2.0, which seems to be compatible with cuda-12.4.

If I downgrade CUDA from 12.4 to 12.3, I got a lot of this error:

error: #error -- unsupported GNU version! gcc versions later than 12 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.

Then, I downgraded GCC from 13.2.0 to 12.3.0, but still met exactly the same error as

....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/detail/reduce.hpp(379): error: no instance of overloaded function "cv::cudev::blockReduce" matches the argument list
            argument types are: (thrust::THRUST_200500_800_860_NS::tuple<volatile int *, volatile int *>, thrust::THRUST_200500_800_860_NS::tuple<int &, int &>, int, thrust::THRUST_200500_800_860_NS::tuple<cv::cudev::minimum<int>, cv::cudev::maximum<int>>)
              blockReduce<BLOCK_SIZE>(smem_tuple(sminval, smaxval), tie(mymin, mymax), tid, make_tuple(minOp, maxOp));
              ^
          detected during:
            instantiation of "void cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, src_type, work_type>::reduceGrid<BLOCK_SIZE>(work_type *, int) [with src_type=uchar, work_type=int, BLOCK_SIZE=256]" at line 412
            instantiation of "void cv::cudev::grid_reduce_detail::reduce<Reductor,BLOCK_SIZE,PATCH_X,PATCH_Y,SrcPtr,ResType,MaskPtr>(SrcPtr, ResType *, MaskPtr, int, int) [with Reductor=cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, uchar, int>, BLOCK_SIZE=256, PATCH_X=4, PATCH_Y=4, SrcPtr=cv::cudev::GlobPtr<uchar>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 421
            instantiation of "void cv::cudev::grid_reduce_detail::reduce<Reductor,Policy,SrcPtr,ResType,MaskPtr>(const SrcPtr &, ResType *, const MaskPtr &, int, int, cudaStream_t) [with Reductor=cv::cudev::grid_reduce_detail::MinMaxReductor<cv::cudev::grid_reduce_detail::both, uchar, int>, Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GlobPtr<uchar>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 460
            instantiation of "void cv::cudev::grid_reduce_detail::minMaxVal<Policy,SrcPtr,ResType,MaskPtr>(const SrcPtr &, ResType *, const MaskPtr &, int, int, cudaStream_t) [with Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GlobPtr<uchar>, ResType=int, MaskPtr=cv::cudev::WithOutMask]" at line 206 of ....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/reduce.hpp
            instantiation of "void cv::cudev::gridFindMinMaxVal_<Policy,SrcPtr,ResType>(const SrcPtr &, cv::cudev::GpuMat_<ResType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultGlobReducePolicy, SrcPtr=cv::cudev::GpuMat_<uchar>, ResType=int]" at line 349 of ....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/reduce.hpp
            instantiation of "void cv::cudev::gridFindMinMaxVal(const SrcPtr &, cv::cudev::GpuMat_<ResType> &, cv::cuda::Stream &) [with SrcPtr=cv::cudev::GpuMat_<uchar>, ResType=int]" at line 68 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu
            instantiation of "void <unnamed>::minMaxImpl<T,R>(const cv::cuda::GpuMat &, const cv::cuda::GpuMat &, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=uchar, R=int]" at line 92 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu

....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/detail/reduce.hpp(379): error: no instance of overloaded function "cv::cudev::blockReduce" matches the argument list
            argument types are: (thrust::THRUST_200500_800_860_NS::tuple<volatile int *, volatile int *>, thrust::THRUST_200500_800_860_NS::tuple<int &, int &>, int, thrust::THRUST_200500_800_860_NS::tuple<cv::cudev::minimum<int>, cv::cudev::maximum<int>>)
              blockReduce<BLOCK_SIZE>(smem_tuple(sminval, smaxval), tie(mymin, mymax), tid, make_tuple(minOp, maxOp));
              ^
          detected during:

Hmm.... no idea. Maybe the upgraded https://github.com/NVIDIA/cccl ???

jiapei100 commented 1 month ago

Yeah, without installing cccl, I got the following errors:

[ 71%] Building CXX object modules/ximgproc/CMakeFiles/opencv_ximgproc.dir/src/fourier_descriptors.cpp.o
cd ....../4.x/opencv/build/modules/ximgproc && /usr/bin/c++ -DCVAPI_EXPORTS -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I....../4.x/opencv/build -I....../4.x/opencv_contrib/modules/ximgproc/include -I....../4.x/opencv/build/modules/ximgproc -I....../4.x/opencv_contrib/modules/cudev/include -I....../4.x/opencv/modules/core/include -I....../4.x/opencv/modules/flann/include -I....../4.x/opencv/modules/imgproc/include -I....../4.x/opencv/modules/dnn/include -I....../4.x/opencv/modules/features2d/include -I....../4.x/opencv/modules/imgcodecs/include -I....../4.x/opencv/modules/calib3d/include -I....../4.x/opencv/modules/video/include -isystem /usr/include/gdal -isystem /usr/include/eigen3 -fsigned-char -ffast-math -fno-finite-math-only -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fno-omit-frame-pointer -pg -g  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -O3 -DNDEBUG  -DNDEBUG -std=c++11 -fPIC -MD -MT modules/ximgproc/CMakeFiles/opencv_ximgproc.dir/src/fourier_descriptors.cpp.o -MF CMakeFiles/opencv_ximgproc.dir/src/fourier_descriptors.cpp.o.d -o CMakeFiles/opencv_ximgproc.dir/src/fourier_descriptors.cpp.o -c ....../4.x/opencv_contrib/modules/ximgproc/src/fourier_descriptors.cpp
....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/split_merge.hpp(120): error: incomplete type is not allowed
      static_assert((VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value), "" " " "VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value");
                                               ^
          detected during:
            instantiation of "void cv::cudev::gridMerge_<Policy,SrcPtrTuple,DstType>(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultSplitMergePolicy, SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<uchar>, cv::cudev::GlobPtr<uchar>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=uchar2]" at line 522
            instantiation of "void cv::cudev::gridMerge(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<uchar>, cv::cudev::GlobPtr<uchar>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=uchar2]" at line 72 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu
            instantiation of "void <unnamed>::MergeFunc<2, T>::call(const cv::cuda::GpuMat *, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=uchar]" at line 120 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu

....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/split_merge.hpp(120): error: incomplete type is not allowed
      static_assert((VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value), "" " " "VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value");
                                               ^
          detected during:
            instantiation of "void cv::cudev::gridMerge_<Policy,SrcPtrTuple,DstType>(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultSplitMergePolicy, SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<ushort>, cv::cudev::GlobPtr<ushort>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=ushort2]" at line 522
            instantiation of "void cv::cudev::gridMerge(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<ushort>, cv::cudev::GlobPtr<ushort>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=ushort2]" at line 72 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu
            instantiation of "void <unnamed>::MergeFunc<2, T>::call(const cv::cuda::GpuMat *, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=ushort]" at line 120 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu

....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/split_merge.hpp(120): error: incomplete type is not allowed
      static_assert((VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value), "" " " "VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value");
                                               ^
          detected during:
            instantiation of "void cv::cudev::gridMerge_<Policy,SrcPtrTuple,DstType>(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultSplitMergePolicy, SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<int>, cv::cudev::GlobPtr<int>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=int2]" at line 522
            instantiation of "void cv::cudev::gridMerge(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<int>, cv::cudev::GlobPtr<int>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=int2]" at line 72 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu
            instantiation of "void <unnamed>::MergeFunc<2, T>::call(const cv::cuda::GpuMat *, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=int]" at line 120 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu

....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/split_merge.hpp(120): error: incomplete type is not allowed
      static_assert((VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value), "" " " "VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value");
                                               ^
          detected during:
            instantiation of "void cv::cudev::gridMerge_<Policy,SrcPtrTuple,DstType>(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultSplitMergePolicy, SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<double>, cv::cudev::GlobPtr<double>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=double2]" at line 522
            instantiation of "void cv::cudev::gridMerge(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<double>, cv::cudev::GlobPtr<double>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=double2]" at line 72 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu
            instantiation of "void <unnamed>::MergeFunc<2, T>::call(const cv::cuda::GpuMat *, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=double]" at line 120 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu

....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/split_merge.hpp(120): error: incomplete type is not allowed
      static_assert((VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value), "" " " "VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value");
                                               ^
          detected during:
            instantiation of "void cv::cudev::gridMerge_<Policy,SrcPtrTuple,DstType>(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultSplitMergePolicy, SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<uchar>, cv::cudev::GlobPtr<uchar>, cv::cudev::GlobPtr<uchar>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=uchar3]" at line 522
            instantiation of "void cv::cudev::gridMerge(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<uchar>, cv::cudev::GlobPtr<uchar>, cv::cudev::GlobPtr<uchar>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=uchar3]" at line 82 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu
            instantiation of "void <unnamed>::MergeFunc<3, T>::call(const cv::cuda::GpuMat *, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=uchar]" at line 121 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu

....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/split_merge.hpp(120): error: incomplete type is not allowed
      static_assert((VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value), "" " " "VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value");
                                               ^
          detected during:
            instantiation of "void cv::cudev::gridMerge_<Policy,SrcPtrTuple,DstType>(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultSplitMergePolicy, SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<ushort>, cv::cudev::GlobPtr<ushort>, cv::cudev::GlobPtr<ushort>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=ushort3]" at line 522
            instantiation of "void cv::cudev::gridMerge(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<ushort>, cv::cudev::GlobPtr<ushort>, cv::cudev::GlobPtr<ushort>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=ushort3]" at line 82 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu
            instantiation of "void <unnamed>::MergeFunc<3, T>::call(const cv::cuda::GpuMat *, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=ushort]" at line 121 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu

....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/split_merge.hpp(120): error: incomplete type is not allowed
      static_assert((VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value), "" " " "VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value");
                                               ^
          detected during:
            instantiation of "void cv::cudev::gridMerge_<Policy,SrcPtrTuple,DstType>(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultSplitMergePolicy, SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<int>, cv::cudev::GlobPtr<int>, cv::cudev::GlobPtr<int>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=int3]" at line 522
            instantiation of "void cv::cudev::gridMerge(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<int>, cv::cudev::GlobPtr<int>, cv::cudev::GlobPtr<int>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=int3]" at line 82 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu
            instantiation of "void <unnamed>::MergeFunc<3, T>::call(const cv::cuda::GpuMat *, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=int]" at line 121 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu

....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/split_merge.hpp(120): error: incomplete type is not allowed
      static_assert((VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value), "" " " "VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value");
                                               ^
          detected during:
            instantiation of "void cv::cudev::gridMerge_<Policy,SrcPtrTuple,DstType>(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultSplitMergePolicy, SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<double>, cv::cudev::GlobPtr<double>, cv::cudev::GlobPtr<double>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=double3]" at line 522
            instantiation of "void cv::cudev::gridMerge(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<double>, cv::cudev::GlobPtr<double>, cv::cudev::GlobPtr<double>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=double3]" at line 82 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu
            instantiation of "void <unnamed>::MergeFunc<3, T>::call(const cv::cuda::GpuMat *, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=double]" at line 121 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu

....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/split_merge.hpp(120): error: incomplete type is not allowed
      static_assert((VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value), "" " " "VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value");
                                               ^
          detected during:
            instantiation of "void cv::cudev::gridMerge_<Policy,SrcPtrTuple,DstType>(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultSplitMergePolicy, SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<uchar>, cv::cudev::GlobPtr<uchar>, cv::cudev::GlobPtr<uchar>, cv::cudev::GlobPtr<uchar>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=uchar4]" at line 522
            instantiation of "void cv::cudev::gridMerge(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<uchar>, cv::cudev::GlobPtr<uchar>, cv::cudev::GlobPtr<uchar>, cv::cudev::GlobPtr<uchar>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=uchar4]" at line 92 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu
            instantiation of "void <unnamed>::MergeFunc<4, T>::call(const cv::cuda::GpuMat *, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=uchar]" at line 122 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu

....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/split_merge.hpp(120): error: incomplete type is not allowed
      static_assert((VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value), "" " " "VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value");
                                               ^
          detected during:
            instantiation of "void cv::cudev::gridMerge_<Policy,SrcPtrTuple,DstType>(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultSplitMergePolicy, SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<ushort>, cv::cudev::GlobPtr<ushort>, cv::cudev::GlobPtr<ushort>, cv::cudev::GlobPtr<ushort>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=ushort4]" at line 522
            instantiation of "void cv::cudev::gridMerge(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<ushort>, cv::cudev::GlobPtr<ushort>, cv::cudev::GlobPtr<ushort>, cv::cudev::GlobPtr<ushort>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=ushort4]" at line 92 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu
            instantiation of "void <unnamed>::MergeFunc<4, T>::call(const cv::cuda::GpuMat *, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=ushort]" at line 122 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu

....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/split_merge.hpp(120): error: incomplete type is not allowed
      static_assert((VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value), "" " " "VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value");
                                               ^
          detected during:
            instantiation of "void cv::cudev::gridMerge_<Policy,SrcPtrTuple,DstType>(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultSplitMergePolicy, SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<int>, cv::cudev::GlobPtr<int>, cv::cudev::GlobPtr<int>, cv::cudev::GlobPtr<int>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=int4]" at line 522
            instantiation of "void cv::cudev::gridMerge(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<int>, cv::cudev::GlobPtr<int>, cv::cudev::GlobPtr<int>, cv::cudev::GlobPtr<int>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=int4]" at line 92 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu
            instantiation of "void <unnamed>::MergeFunc<4, T>::call(const cv::cuda::GpuMat *, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=int]" at line 122 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu

....../4.x/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/split_merge.hpp(120): error: incomplete type is not allowed
      static_assert((VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value), "" " " "VecTraits<DstType>::cn == std::tuple_size<SrcPtrTuple>::value");
                                               ^
          detected during:
            instantiation of "void cv::cudev::gridMerge_<Policy,SrcPtrTuple,DstType>(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with Policy=cv::cudev::DefaultSplitMergePolicy, SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<double>, cv::cudev::GlobPtr<double>, cv::cudev::GlobPtr<double>, cv::cudev::GlobPtr<double>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=double4]" at line 522
            instantiation of "void cv::cudev::gridMerge(const SrcPtrTuple &, const cv::cudev::GlobPtrSz<DstType> &, cv::cuda::Stream &) [with SrcPtrTuple=cv::cudev::ZipPtrSz<thrust::tuple<cv::cudev::GlobPtr<double>, cv::cudev::GlobPtr<double>, cv::cudev::GlobPtr<double>, cv::cudev::GlobPtr<double>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, DstType=double4]" at line 92 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu
            instantiation of "void <unnamed>::MergeFunc<4, T>::call(const cv::cuda::GpuMat *, cv::cuda::GpuMat &, cv::cuda::Stream &) [with T=double]" at line 122 of ....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu

12 errors detected in the compilation of "....../4.x/opencv_contrib/modules/cudaarithm/src/cuda/split_merge.cu".
[ 71%] Building CXX object modules/tracking/CMakeFiles/opencv_tracking.dir/src/trackerFeatureSet.cpp.o
cd ....../4.x/opencv/build/modules/tracking && /usr/bin/c++ -DCVAPI_EXPORTS -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I....../4.x/opencv/build -I....../4.x/opencv_contrib/modules/tracking/include -I....../4.x/opencv/build/modules/tracking -I....../4.x/opencv_contrib/modules/cudev/include -I....../4.x/opencv/modules/core/include -I....../4.x/opencv/modules/flann/include -I....../4.x/opencv/modules/imgproc/include -I....../4.x/opencv/modules/ml/include -I....../4.x/opencv_contrib/modules/plot/include -I....../4.x/opencv/modules/dnn/include -I....../4.x/opencv/modules/features2d/include -I....../4.x/opencv/modules/imgcodecs/include -I....../4.x/opencv_contrib/modules/text/include -I....../4.x/opencv/modules/videoio/include -I....../4.x/opencv/modules/calib3d/include -I....../4.x/opencv_contrib/modules/datasets/include -I....../4.x/opencv/modules/highgui/include -I....../4.x/opencv/modules/video/include -isystem /usr/include/gdal -isystem /usr/include/eigen3 -fsigned-char -ffast-math -fno-finite-math-only -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fno-omit-frame-pointer -pg -g  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -Wno-shadow -O3 -DNDEBUG  -DNDEBUG -std=c++11 -fPIC -MD -MT modules/tracking/CMakeFiles/opencv_tracking.dir/src/trackerFeatureSet.cpp.o -MF CMakeFiles/opencv_tracking.dir/src/trackerFeatureSet.cpp.o.d -o CMakeFiles/opencv_tracking.dir/src/trackerFeatureSet.cpp.o -c ....../4.x/opencv_contrib/modules/tracking/src/trackerFeatureSet.cpp
-- Removing ....../4.x/opencv/build/modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_split_merge.cu.o
/usr/bin/cmake -E rm -f ....../4.x/opencv/build/modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_split_merge.cu.o
CMake Error at cuda_compile_1_generated_split_merge.cu.o.Release.cmake:280 (message):
  Error generating file
  ....../4.x/opencv/build/modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_split_merge.cu.o

make[2]: *** [modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/build.make:17830: modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_split_merge.cu.o] Error 1
make[2]: Leaving directory '....../4.x/opencv/build'
make[1]: *** [CMakeFiles/Makefile2:3712: modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/all] Error 2
jiapei100 commented 1 month ago

yeah.... Problem solved by just Turn OFF rgbd... Thanks