Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With texture reference being removed from CUDA 12 version onwards, build gives errors like DeviceMemory.cu(160): error: texture is not a template #24

Open
Abhishekghosh1998 opened this issue Jul 30, 2023 · 2 comments

Comments

@Abhishekghosh1998
Copy link

My system specifications:
GPU : NVIDIA GeForce RTX 2080
CUDA Version: 12.2


I tried the following steps:

$ git clone "https://github.com/utcs-scea/altis"
$ cd altis/
$ ./setup.sh
-- The CXX compiler identification is GNU 11.3.0
-- The CUDA compiler identification is NVIDIA 12.2.91
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done                                                                                       
-- Detecting CUDA compiler ABI info                                                                                            
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Configuring done (2.5s)
-- Generating done (0.1s)
-- Build files have been written to: /media/abhishek/Abhishek_HDD/workloads/altis/build
[  1%] Building CUDA object src/cuda/level0/devicememory/CMakeFiles/devicememoryLib.dir/DeviceMemory.cu.o
[  3%] Building CUDA object src/cuda/level0/busspeeddownload/CMakeFiles/busspeeddownloadLib.dir/BusSpeedDownload.cu.o
[  3%] Building CUDA object src/cuda/level0/maxflops/CMakeFiles/maxflopsLib.dir/MaxFlops.cu.o
[  3%] Building CXX object src/common/CMakeFiles/AltisCommon.dir/ResultDatabase.cpp.o
[  4%] Building CXX object src/common/CMakeFiles/AltisCommon.dir/OptionParser.cpp.o
[  5%] Building CUDA object src/cuda/level1/bfs/CMakeFiles/bfsLib.dir/bfs.cu.o
[  6%] Building CUDA object src/cuda/level0/busspeedreadback/CMakeFiles/busspeedreadbackLib.dir/BusSpeedReadback.cu.o
[  8%] Building CUDA object src/cuda/level2/cfd/CMakeFiles/cfddoubleLib.dir/euler3d_double.cu.o
[  9%] Building CUDA object src/cuda/level2/fdtd2d/CMakeFiles/fdtd2dLib.dir/fdtd2d.cu.o
[  8%] Building CUDA object src/cuda/level1/gemm/CMakeFiles/gemmLib.dir/Gemm.cu.o
[ 10%] Building CUDA object src/cuda/level1/gups/CMakeFiles/gupsLib.dir/gups.cu.o
[ 11%] Building CUDA object src/cuda/level1/pathfinder/CMakeFiles/pathfinderLib.dir/pathfinder.cu.o
[ 13%] Building CUDA object src/cuda/level2/cfd/CMakeFiles/cfdLib.dir/euler3d.cu.o
[ 14%] Building CUDA object src/cuda/level2/kmeans/CMakeFiles/kmeansLib.dir/kmmain.cu.o
[ 14%] Building CUDA object src/cuda/level1/sort/CMakeFiles/sortLib.dir/Sort.cu.o
[ 14%] Building CUDA object src/cuda/level2/dwt2d/CMakeFiles/dwt2dLib.dir/dwt_main.cu.o
/media/abhishek/Abhishek_HDD/workloads/altis/src/cuda/level0/devicememory/DeviceMemory.cu(160): error: texture is not a template
  texture<float4, 2, cudaReadModeElementType> texA;
  ^

/media/abhishek/Abhishek_HDD/workloads/altis/src/cuda/level0/devicememory/DeviceMemory.cu(510): error: identifier "cudaBindTextureToArray" is undefined
          __checkCudaErrors (cudaBindTextureToArray(texA, cuArray), "/media/abhishek/Abhishek_HDD/DGSF_workloads/altis/src/cuda/level0/devicememory/DeviceMemory.cu", 510);
                             ^

/media/abhishek/Abhishek_HDD/workloads/altis/src/cuda/level0/devicememory/DeviceMemory.cu(588): error: identifier "cudaUnbindTexture" is undefined
          __checkCudaErrors (cudaUnbindTexture(texA), "/media/abhishek/Abhishek_HDD/DGSF_workloads/altis/src/cuda/level0/devicememory/DeviceMemory.cu", 588);
                             ^

/media/abhishek/Abhishek_HDD/workloads/altis/src/cuda/level0/devicememory/DeviceMemory.cu(848): error: no instance of overloaded function "tex2D" matches the argument list
            argument types are: (<error-type>, float, float)
          float4 v = tex2D(texA, float(idx_x), float(idx_y));
                     ^

/media/abhishek/Abhishek_HDD/workloads/altis/src/cuda/level0/devicememory/DeviceMemory.cu(872): error: no instance of overloaded function "tex2D" matches the argument list
            argument types are: (<error-type>, float, float)
          float4 v = tex2D(texA, float(idx_x), float(idx_y));
                     ^

/media/abhishek/Abhishek_HDD/workloads/altis/src/cuda/level0/devicememory/DeviceMemory.cu(899): error: no instance of overloaded function "tex2D" matches the argument list
            argument types are: (<error-type>, float, float)
          float4 v = tex2D(texA, float(idx_x), float(idx_y));
                     ^

6 errors detected in the compilation of "/media/abhishek/Abhishek_HDD/workloads/altis/src/cuda/level0/devicememory/DeviceMemory.cu".
make[2]: *** [src/cuda/level0/devicememory/CMakeFiles/devicememoryLib.dir/build.make:77: src/cuda/level0/devicememory/CMakeFiles/devicememoryLib.dir/DeviceMemory.cu.o] Error 2
make[1]: *** [CMakeFiles/Makefile2:800: src/cuda/level0/devicememory/CMakeFiles/devicememoryLib.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 15%] Building CUDA object src/cuda/level2/dwt2d/CMakeFiles/dwt2dLib.dir/dwt.cu.o
[ 16%] Building CXX object src/common/CMakeFiles/AltisCommon.dir/Option.cpp.o
[ 17%] Building CXX object src/common/CMakeFiles/AltisCommon.dir/ProgressBar.cpp.o
[ 18%] Building CUDA object src/cuda/level2/dwt2d/CMakeFiles/dwt2dLib.dir/components.cu.o
[ 19%] Linking CXX static library libAltisCommon.a
[ 19%] Built target AltisCommon
[ 20%] Building CUDA object src/cuda/level1/sort/CMakeFiles/sortLib.dir/sort_kernel.cu.o
[ 21%] Linking CUDA static library libbusspeedreadbackLib.a
[ 21%] Built target busspeedreadbackLib
[ 22%] Building CUDA object src/cuda/level2/dwt2d/CMakeFiles/dwt2dLib.dir/dwt_cuda/fdwt53.cu.o
[ 22%] Linking CUDA static library libbusspeeddownloadLib.a
[ 22%] Built target busspeeddownloadLib
[ 23%] Building CUDA object src/cuda/level2/dwt2d/CMakeFiles/dwt2dLib.dir/dwt_cuda/rdwt53.cu.o
[ 24%] Building CUDA object src/cuda/level2/dwt2d/CMakeFiles/dwt2dLib.dir/dwt_cuda/fdwt97.cu.o
[ 25%] Linking CUDA static library libsortLib.a
[ 26%] Building CUDA object src/cuda/level2/dwt2d/CMakeFiles/dwt2dLib.dir/dwt_cuda/rdwt97.cu.o
[ 26%] Built target sortLib
[ 26%] Linking CUDA static library libpathfinderLib.a
[ 26%] Building CUDA object src/cuda/level2/dwt2d/CMakeFiles/dwt2dLib.dir/dwt_cuda/common.cu.o
[ 27%] Linking CUDA static library libgupsLib.a
[ 28%] Linking CUDA static library libbfsLib.a
[ 28%] Built target pathfinderLib
[ 28%] Built target gupsLib
[ 28%] Building CUDA object src/cuda/level2/kmeans/CMakeFiles/kmeansLib.dir/kmeansraw.cu.o
[ 28%] Built target bfsLib
[ 29%] Linking CUDA static library libcfddoubleLib.a
[ 30%] Linking CUDA static library libcfdLib.a
[ 30%] Built target cfddoubleLib
[ 30%] Built target cfdLib
[ 31%] Linking CUDA static library libgemmLib.a
[ 31%] Built target gemmLib
[ 31%] Linking CUDA static library libfdtd2dLib.a
[ 31%] Built target fdtd2dLib
[ 32%] Linking CUDA static library libdwt2dLib.a
[ 32%] Built target dwt2dLib
[ 33%] Linking CUDA static library libmaxflopsLib.a
[ 33%] Built target maxflopsLib
[ 34%] Linking CUDA static library libkmeansLib.a
[ 34%] Built target kmeansLib
make: *** [Makefile:91: all] Error 2

The errors are because NVIDIA has dropped the support for texture references from CUDA 12.0, mentioned here.

@BDHU
Copy link
Member

BDHU commented Sep 6, 2023

Thanks! We plan to update the suite for CUDA 12 soon.

@saurabh-singh-rajput
Copy link

@BDHU Hi, any updates on this? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants