NVIDIA / cuda-samples

Samples for CUDA Developers which demonstrates features in CUDA Toolkit
Other
6.47k stars 1.83k forks source link

LargeKernalParameter Error #215

Open naren2cmu opened 1 year ago

naren2cmu commented 1 year ago

hi, I have cuda 11.8 installed. I am getting this error when I run make to install cuda samples. What do I do?

make[1]: Entering directory '/home/naren/naren_research/cuda-samples/Samples/6_Performance/LargeKernelParameter'
/usr/local/cuda/bin/nvcc -ccbin g++ -I../../../Common  -m64    --std=c++11 --threads 0 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_89,code=sm_89 -gencode arch=compute_90,code=sm_90 -gencode arch=compute_90,code=compute_90 -o LargeKernelParameter.o -c LargeKernelParameter.cu
LargeKernelParameter.cu(58): Error: Formal parameter space overflowed (4104 bytes required, max 4096 bytes allowed) in function _Z13kernelDefault7param_tPi
LargeKernelParameter.cu(75): Error: Formal parameter space overflowed (32008 bytes required, max 4096 bytes allowed) in function _Z16kernelLargeParam13param_large_tPi

make[1]: *** [Makefile:324: LargeKernelParameter.o] Error 255
make[1]: Leaving directory '/home/naren/naren_research/cuda-samples/Samples/6_Performance/LargeKernelParameter'
make: *** [Makefile:45: Samples/6_Performance/LargeKernelParameter/Makefile.ph_build] Error 2
joshuaoreilly commented 1 year ago

I think the master branch is for CUDA 12.2; you'll have to checkout the last commit for CUDA 11.8 (by running git checkout 8199209). You can find the commit hash on the release page, or just copy the snippet above. This worked for me for CUDA 12.0, at least in order to compile the samples I wanted to run.

ct-777 commented 1 year ago

I got the same error with CUDA 12.2

keithyau commented 1 month ago

Same here , please help. CUDA 12.4 with open source kernel module

Image

smlng commented 1 week ago

I ran into the same problem. Run nvcc --version, and then checkout the tag of the version you have. For me it was 12.0, so I ran git checkout v12.0. Then run make again and it should not fail (at least no with this error).