About GPU Version Compilation of RTK

Recently, I have been learning RTK, and there are no issues with the CPU version compilation. However, after installing Cuda, I marked RTK in the cmake option_ USE_ CUDA, I can’t compile it anymore. I am sure Cuda has been installed and tested on my computer

>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(152): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>D:\RTK-2.4.1\src\rtkCudaDisplacedDetectorImageFilter.cu(96): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaDisplacedDetectorImageFilter.cu(155): error : identifier "cudaBindTexture" is undefined
8>
8>D:\RTK-2.4.1\src\rtkCudaDisplacedDetectorImageFilter.cu(185): error : identifier "cudaUnbindTexture" is undefined
8>
8>
8>7 errors detected in the compilation of "D:/RTK-2.4.1/src/rtkCudaDisplacedDetectorImageFilter.cu".
8>10 errors detected in the compilation of "D:/RTK-2.4.1/src/rtkCudaFDKWeightProjectionFilter.cu".
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(152): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>Compiling CUDA source file ..\..\RTK-2.4.1\src\rtkCudaLaplacianImageFilter.cu...
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(153): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(153): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(158): error : no instance of overloaded function "tex3D" matches the argument list
8>            argument types are: (<error-type>, float, float, float)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(159): error : no instance of overloaded function "tex3D" matches the argument list
8>            argument types are: (<error-type>, float, float, float)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(160): error : no instance of overloaded function "tex3D" matches the argument list
8>            argument types are: (<error-type>, float, float, float)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(164): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(164): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(165): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>rtkCudaDisplacedDetectorImageFilter.cu
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(165): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(166): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(166): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(167): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(167): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>rtkCudaFDKWeightProjectionFilter.cu
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(168): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(168): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(169): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(169): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(178): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(179): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(180): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(181): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(182): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(183): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(184): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(185): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(186): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(187): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(188): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(189): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(326): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(326): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(327): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(327): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(328): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>
8>D:\RTK-2.4.1\src\rtkCudaForwardWarpImageFilter.cu(328): error : no instance of overloaded function "tex1Dfetch" matches the argument list
8>            argument types are: (<error-type>, int)
8>

Here are some error messages

itk-module-init.cmake (2.1 KB)

When I check RTK_ CUDA_ Cmake does not pass during VERSION

CMake Error at Modules/Remote/RTK/itk-module-init.cmake:42 (find_package):
find_package called with invalid argument “ON”
Call Stack (most recent call first):
CMake/ITKModuleEnablement.cmake:338 (include)
CMakeLists.txt:517 (include)

Let’s focus on the configure error. RTK_CUDA_VERSION should be set with a CUDA version, e.g., 11.6. But you don’t have to set it, you can leave it empty.

When I didn’t tick RTK_CUDA_VERSION , it was the compilation error in my question, do you know how to fix it?

help me

my cuda version is 12.0

I sovled this by change cuda version to 11.6

1 Like

Thanks for letting me know, I’ll try to have a look this week at what’s going with Cuda 12. I have never tested it myself.

CUDA 12 removed some long deprecated functionalities (see the deprecation warnings in CUDA 11), lots of them being related to textures.

1 Like