Back to Blog
How to install cuda linux7/9/2023 ![]() ![]() In this tutorial, we saw how to install CUDA on Ubuntu 20.04 Focal Fossa Linux. To comply with the CUDA compiler requirements switch your default GCC compiler to version 8 or lower. usr/local/cuda-10.2/bin/./targets/x86_64-linux/include/crt/host_config.h:138:2: error: #error - unsupported GNU version! gcc versions later than 8 are not supported!ġ38 | #error - unsupported GNU version! gcc versions later than 8 are not supported! As a result upon the code compilation with the Nvidia CUDA compiler you might receive the following error: In file included from /usr/local/cuda-10.2/bin/./targets/x86_64-linux/include/cuda_runtime.h:83, Next, use nvcc the Nvidia CUDA compiler to compile the code and run the newly compiled binary: $ nvcc -o hello hello.cuĪt the moment CUDA does not support GCC compiler higher then version 8 when installed from CUDA Ubuntu 18.04 sources. ![]() Int i = blockIdx.x*blockDim.x + threadIdx.x ĬudaMemcpy(y, d_y, N*sizeof(float), cudaMemcpyDeviceToHost) Void saxpy(int n, float a, float *x, float *y) Save the following code into a file named eg. Check CUDA version to confirm the installation:Ĭopyright (c) 2005-2019 NVIDIA CorporationĬuda compilation tools, release 10.2, V10.2.89Ĭonfirm the installation by compiling an example CUDA C code.$ echo 'export PATH=/usr/local/cuda/bin$' > ~/.bashrc Once ready, set your path to point to CUDA binaries:. ![]()
0 Comments
Read More
Leave a Reply. |