Skip to content

[BUG] Building error in user/cuda/ktmig.cu #294

Description

@SIKtt

I got same error as #285 when building user/cuda/ktmig.cu. It seems that CUDA 12.0 removed support for texture references.

code version 8afd0fa

Linux 5.10.60.1-microsoft-standard-WSL2
Python 3.11.2
gcc (Debian 12.2.0-14) 12.2.0
nvcc --version
Built on Mon_Apr__3_17:16:06_PDT_2023
Cuda compilation tools, release 12.1, V12.1.105
Build cuda_12.1.r12.1/compiler.32688072_0

Log here:

/usr/local/cuda/bin/nvcc -o build/user/cuda/gpuktmig.o -c --x=cu -DNO_BLAS -I/usr/include/cblas -Ibuild/include build/user/cuda/gpuktmig.c
build/user/cuda/ktmig.cu(56): error: texture is not a template
  texture<float2, 1, cudaReadModeElementType> t_sxy;
  ^

build/user/cuda/ktmig.cu(58): error: texture is not a template
  texture<float2, 1, cudaReadModeElementType> t_gxy;
  ^

build/user/cuda/ktmig.cu(60): error: texture is not a template
  texture<float4, 1, cudaReadModeElementType> t_ixy;
  ^

build/user/cuda/ktmig.cu(62): error: texture is not a template
  texture<float, 2, cudaReadModeElementType> t_i;
  ^

build/user/cuda/ktmig.cu(64): error: texture is not a template
  texture<uint, 1, cudaReadModeElementType> t_ap;
  ^

build/user/cuda/ktmig.cu(208): error: no instance of overloaded function "tex1Dfetch" matches the argument list
            argument types are: (<error-type>, int)
          xy = tex1Dfetch (t_sxy, i);
               ^

build/user/cuda/ktmig.cu(212): error: no instance of overloaded function "tex1Dfetch" matches the argument list
            argument types are: (<error-type>, int)
          xy = tex1Dfetch (t_gxy, i);
               ^

build/user/cuda/ktmig.cu(236): error: no instance of overloaded function "tex1Dfetch" matches the argument list
            argument types are: (<error-type>, unsigned int)
      const unsigned int bidx = tex1Dfetch (t_ap, blockIdx.y + lshift);
                                ^

build/user/cuda/ktmig.cu(258): error: no instance of overloaded function "tex1Dfetch" matches the argument list
            argument types are: (<error-type>, <error-type>)
          vec2 = tex1Dfetch (t_ixy, i*c_ibn + bidx);
                 ^

build/user/cuda/ktmig.cu(283): error: no instance of overloaded function "tex2D" matches the argument list
            argument types are: (<error-type>, float, float)
              smp = 2.0f*tex2D (t_i, j + 0.5f, i + 0.5f)
                         ^

build/user/cuda/ktmig.cu(284): error: no instance of overloaded function "tex2D" matches the argument list
            argument types are: (<error-type>, float, float)
                    -tex2D (t_i, j - k - 0.5f, i + 0.5f)
                     ^

build/user/cuda/ktmig.cu(285): error: no instance of overloaded function "tex2D" matches the argument list
            argument types are: (<error-type>, float, float)
                    -tex2D (t_i, j + k + 1.5f, i + 0.5f);
                     ^

build/user/cuda/ktmig.cu(310): error: no instance of overloaded function "tex1Dfetch" matches the argument list
            argument types are: (<error-type>, unsigned int)
      const unsigned int bidx = tex1Dfetch (t_ap, blockIdx.y + lshift);
                                ^

build/user/cuda/ktmig.cu(331): error: no instance of overloaded function "tex1Dfetch" matches the argument list
            argument types are: (<error-type>, <error-type>)
          vec2 = tex1Dfetch (t_ixy, i*c_ibn + bidx);
                 ^

build/user/cuda/ktmig.cu(345): error: no instance of overloaded function "tex2D" matches the argument list
            argument types are: (<error-type>, float, float)
              img += tex2D (t_i, j + 0.5f, k);
                     ^

build/user/cuda/gpuktmig.c(291): error: identifier "cudaBindTextureToArray" is undefined
      cudaBindTextureToArray (t_i, d_rt);
      ^

build/user/cuda/gpuktmig.c(302): error: identifier "cudaBindTexture" is undefined
      cudaBindTexture (0, t_sxy, d_sxy, btr*sizeof(float2));
      ^

build/user/cuda/gpuktmig.c(593): error: identifier "cudaUnbindTexture" is undefined
      cudaUnbindTexture (t_i);
      ^

18 errors detected in the compilation of "build/user/cuda/gpuktmig.c".
scons: *** [build/user/cuda/gpuktmig.o] Error 2
scons: building terminated because of errors.
make: *** [Makefile:4: all] Error 2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions