Wednesday, March 1, 2023

How to fix gpu_burn compiler failure issue

System Environment:

Ubuntu 22.04 LTS Server

CUDA v12.0

GPU: RTX-4080 (driver 525.85.05)

AP: GPU_Burn v1.1


Symptom:

met error in make gpu_burn.

fae@intel:~/gpu_burn$ sudo make
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:.:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin /usr/local/cuda/bin/nvcc -I/usr/local/cuda/include -arch=compute_30 -ptx compare.cu -o compare.ptx
nvcc fatal   : Value 'compute_30' is not defined for option 'gpu-architecture'
Makefile:10: recipe for target 'drv' failed
make: *** [drv] Error 1


This symptom cause by nvcc --gpu-architecture (-arch) in CUDA v12.0 not support compute_30. So we should edit Makefile as below.


CUDAPATH=/usr/local/cuda

# Have this point to an old enough gcc (for nvcc)
GCCPATH=/usr

NVCC=${CUDAPATH}/bin/nvcc
CCPATH=${GCCPATH}/bin

drv:
    PATH=${PATH}:.:${CCPATH}:${PATH} ${NVCC} -I${CUDAPATH}/include -arch=compute_30 -ptx compare.cu -o compare.ptx
    g++ -O3 -Wno-unused-result -I${CUDAPATH}/include -c gpu_burn-drv.cpp
    g++ -o gpu_burn gpu_burn-drv.o -O3 -lcuda -L${CUDAPATH}/lib64 -L${CUDAPATH}/lib -Wl,-rpath=${CUDAPATH}/lib64 -Wl,-rpath=${CUDAPATH}/lib -lcublas -lcudart -o gpu_burn


Change -arch=compute_50 to compute_90, or refer the Virtual Architecture Feature List change value.








No comments:

Post a Comment

How to fix gpu_burn compiler failure issue

System Environment: Ubuntu 22.04 LTS Server CUDA v12.0 GPU: RTX-4080 (driver 525.85.05) AP: GPU_Burn v1.1 Symptom: met error in make gpu_bur...