texture templates do not exist in CUDA from 12.x on -> cuda support does not work anymore
Opened this issue · 0 comments
Starting from CUDA 12.x, texture templates, which had long been deprecated, have been evicted completely.
As a result, all cu files that used them now fail to compile, with errors like:
`
Rgemm_tesla.cu(52): error: texture is not a template
texture < int4, 1 > tex_x_double_A;
^
Rgemm_tesla.cu(53): error: texture is not a template
texture < int4, 1 > tex_x_double_B;
^
Rgemm_tesla.cu(64): error: no instance of overloaded function "tex1Dfetch" matches the argument list
argument types are: (, const int)
register int4 v = tex1Dfetch(tex_x_double_A, i);
^
Rgemm_tesla.cu(75): error: no instance of overloaded function "tex1Dfetch" matches the argument list
argument types are: (, const int)
register int4 v = tex1Dfetch(tex_x_double_B, i);
^
Rgemm_tesla.cu(120): error: identifier "cudaBindTexture" is undefined
rc = cudaBindTexture(0, tex_x_double_A, Adev, channelDesc);
^
Rgemm_tesla.cu(172): error: identifier "cudaUnbindTexture" is undefined
rc = cudaUnbindTexture(tex_x_double_A);
^
Rgemm_fermi.cu(52): error: texture is not a template
texture < int4, 1 > tex_x_double_A;
^
Rgemm_fermi.cu(53): error: texture is not a template
texture < int4, 1 > tex_x_double_B;
^
Rgemm_fermi.cu(64): error: no instance of overloaded function "tex1Dfetch" matches the argument list
argument types are: (, const int)
register int4 v = tex1Dfetch(tex_x_double_A, i);
^
Rgemm_fermi.cu(75): error: no instance of overloaded function "tex1Dfetch" matches the argument list
argument types are: (, const int)
register int4 v = tex1Dfetch(tex_x_double_B, i);
^
6 errors detected in the compilation of "Rgemm_tesla.cu".
Rsyrk_cuda.cu(57): error: texture is not a template
texture < int4, 1 > tex_x_double_A;
^
Rsyrk_cuda.cu(58): error: texture is not a template
texture < int4, 1 > tex_x_double_B;
^
Rsyrk_cuda.cu(63): error: no instance of overloaded function "tex1Dfetch" matches the argument list
argument types are: (, const int)
register int4 v = tex1Dfetch(tex_x_double_A, i);
^
Rsyrk_cuda.cu(90): error: identifier "cudaBindTexture" is undefined
rc = cudaBindTexture(0, tex_x_double_A, Adev, channelDesc);
^
Rsyrk_cuda.cu(138): error: identifier "cudaUnbindTexture" is undefined
rc = cudaUnbindTexture(tex_x_double_A);
^
Rgemm_fermi.cu(127): error: identifier "cudaBindTexture" is undefined
rc = cudaBindTexture(0, tex_x_double_A, Adev, channelDesc);
^
Rgemm_fermi.cu(179): error: identifier "cudaUnbindTexture" is undefined
rc = cudaUnbindTexture(tex_x_double_A);
^
5 errors detected in the compilation of "Rsyrk_cuda.cu".
Rsyrk.cu(52): error: texture is not a template
texture < int4, 1 > tex_x_double_A;
^
Rsyrk.cu(53): error: texture is not a template
texture < int4, 1 > tex_x_double_B;
^
Rsyrk.cu(63): error: no instance of overloaded function "tex1Dfetch" matches the argument list
argument types are: (, const int)
register int4 v = tex1Dfetch(tex_x_double_A, i);
^
6 errors detected in the compilation of "Rgemm_fermi.cu".
make[4]: *** [Makefile:683: Rgemm_tesla.lo] Errore 1
make[4]: *** Attesa per i processi non terminati....
3 errors detected in the compilation of "Rsyrk.cu".
make[4]: *** [Makefile:683: Rsyrk_cuda.lo] Errore 1
make[4]: *** [Makefile:683: Rgemm_fermi.lo] Errore 1
make[4]: *** [Makefile:683: Rsyrk.lo] Errore 1
`
The required action is to transition from texture templates to texture objects.
The following link provides some information on how to do that:
https://developer.nvidia.com/blog/cuda-pro-tip-kepler-texture-objects-improve-performance-and-flexibility/
Thanks in advance, bye
Giacomo Mulas giacomo.mulas@inaf.it