[Rtk-users] Fix the issue when use RTK on Nvidia Kepler Architecture based GPU.
Simon Rit
simon.rit at creatis.insa-lyon.fr
Wed Feb 5 11:42:38 EST 2014
Dear Peng Liu,
Thanks a lot, I have pushed your change right now. Don't hesitate to
suggest changes in those flags, I don't think that so many people are
familiar with them...
Simon
On Mon, Jan 20, 2014 at 10:06 AM, 刘鹏 <liupeng_cs at 163.com> wrote:
> Hello,
>
>
>
> I find an issue when I try to use RTK on a Nvidia Kepler based GPU.
>
> The CUDA initializing always fails.
>
> And I can see an exception about _cudaMutexOperation when any CUDA
> function is called in debug mode.
>
>
>
> Exception at 0x7fefd5f940d, code: 0xe06d7363: C++ exception, flags=0x1
> (execution cannot be continued) (first chance) in
> cudart64_50_35!_cudaMutexOperation
>
>
>
>
>
> Following the guide in
>
> http://docs.nvidia.com/cuda/kepler-compatibility-guide/index.html
>
>
>
> This issue can be fixed by applying the patch on RTK code:
>
>
>
>
>
> ===========================================================================
>
>
>
> diff --git a/cmake/FindCUDA_wrap.cmake b/cmake/FindCUDA_wrap.cmake
>
> index e13a7c3..b40c6da 100644
>
> --- a/cmake/FindCUDA_wrap.cmake
>
> +++ b/cmake/FindCUDA_wrap.cmake
>
> @@ -59,9 +59,19 @@ set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS}
>
> )
>
>
>
> if(CUDA_VERSION_MAJOR GREATER "2")
>
> - set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS}
>
> - -gencode arch=compute_20,code=sm_20
>
> - )
>
> + IF(${CUDA_VERSION} LESS 5.0)
>
> + set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS}
>
> + -gencode arch=compute_20,code=sm_20
>
> + -gencode arch=compute_20,code=compute_20
>
> + )
>
> + ELSE()
>
> + set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS}
>
> + -gencode arch=compute_20,code=sm_20
>
> + -gencode arch=compute_30,code=sm_30
>
> + -gencode arch=compute_35,code=sm_35
>
> + -gencode arch=compute_35,code=compute_35
>
> + )
>
> + ENDIF()
>
> endif()
>
>
>
> if(CUDA_FOUND)
>
>
>
>
> ============================================================================
>
>
>
> Regards,
>
>
>
> Peng Liu
>
>
>
> _______________________________________________
> Rtk-users mailing list
> Rtk-users at openrtk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/rtk-users/attachments/20140205/ecee4f21/attachment-0008.html>
More information about the Rtk-users
mailing list