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

Support for CUDA 11 #2

Open
hkashyap opened this issue Aug 20, 2020 · 7 comments
Open

Support for CUDA 11 #2

hkashyap opened this issue Aug 20, 2020 · 7 comments

Comments

@hkashyap
Copy link
Contributor

Add support for CUDA 11 here:

#if defined(__CUDA5__) || defined(__CUDA6__) || defined(__CUDA7__) || defined(__CUDA8__) || defined(__CUDA9__) || defined(__CUDA10__)

@nmsutton
Copy link

nmsutton commented Sep 2, 2021

@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.

@ame68
Copy link

ame68 commented May 11, 2022

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

@nmsutton
Copy link

@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.

@ame68
Copy link

ame68 commented May 12, 2022

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

@nmsutton
Copy link

@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?

@ame68
Copy link

ame68 commented May 13, 2022

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

@nmsutton
Copy link

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.

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