CARLsim5 icon indicating copy to clipboard operation
CARLsim5 copied to clipboard

Support for CUDA 11

Open hkashyap opened this issue 4 years ago • 7 comments

Add support for CUDA 11 here:

https://github.com/UCI-CARL/CARLsim5/blob/9ae8b65fe2cce681ad23055ce6faa40d26d32bf0/carlsim/kernel/inc/cuda_version_control.h#L59

hkashyap avatar Aug 20 '20 15:08 hkashyap

@hkashyap I tried adding " || defined(__CUDA11__)" to the end of this line and it appears to allow CARLsim to recognize my CUDA 11.4 installation. I referer to other developers to assess if anything further needs to be done to have it recognize CUDA 11.

nmsutton avatar Sep 02 '21 23:09 nmsutton

I have put the || defined(CUDA11) in the cuda_version_control.h file and ran cmake but I keep getting a nvcc fatal : Unsupported gpu architecture 'compute_30' when I run make. I tried putting setting arch=compute_75, code=sm_75 and arch=compute_62, code=sm_62 explicitly in the CMakeLists.txt but I still keep getting nvcc fatal : Unsupported gpu architecture 'compute_30' when I run make. I am using cuda 11.1, Ubuntu 20.04. Has anyone else experienced this issue? Thanks

ame68 avatar May 11 '22 21:05 ame68

@ame68 unless I am mistaken compute_30 is set to be depreciated or may already be depreciated on newer Nvidia graphics cards or newer CUDA versions. One may need to remove all mentions of compute_30 and correspondingly sm_30 from the make code for certain graphics cards/CUDA versions. This may also be the same for compute_35 and compute_37. Another point is that running the code at the highest compute_xx level that matches what your GPU can support may possibly provide better performance but I am not sure if this is true. I would be interested to find if you end up getting CARLsim5 to run with CUDA 11 once you make the changes.

nmsutton avatar May 11 '22 21:05 nmsutton

Thanks for the help my code is compiling and working with CUDA 11.1 now. If anyone else out there runs into a problem with 'compute_30' the files you need to make changes to are: CARLsim5-5.0/carlsim/configure.mk CARLsim5-5.0/carlsim/kernel/carlsim.vcxproj CARLsim5-5.0/carlsim/kernel/CMakeLists.txt

ame68 avatar May 12 '22 15:05 ame68

@ame68 glad to hear that. Could you please share, what GPU and OS (including version) do you use for anyone's reference in case it can be helpful? Btw, since the current CUDA version is 11.6, did you find that 11.1 works in particular as compared to the newest version or you have not tried the newest CUDA version with CS5?

nmsutton avatar May 12 '22 20:05 nmsutton

Sure, the GPU is an Nvidia GeForce RTX 2060 and the OS is Ubuntu 20.04.4 LTS. CUDA 11.1 is the version I currently have on my system, I have not tried CS5 with any others since I upgraded from CUDA 10.2. Thanks

ame68 avatar May 13 '22 15:05 ame68

Thanks for the info. If someone were to write a way to auto detect compute_xx needed for GPUs or at least make a way for users to easily understand how to configure this in compile options as well as put the info in the main branch readme file I would close this issue. However, such things may end up waiting until they are addressed in CARLsim6, then they can be backported to CARLsim5 or earlier versions.

nmsutton avatar May 13 '22 20:05 nmsutton