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

cudnn and cufft #96

Open
solarflarefx opened this issue Jan 25, 2021 · 3 comments
Open

cudnn and cufft #96

solarflarefx opened this issue Jan 25, 2021 · 3 comments

Comments

@solarflarefx
Copy link

Are there any plans to update cudnn and cufft to CUDA 11.1? Seems they are based on older versions:

image

@kunzmi
Copy link
Owner

kunzmi commented Jan 26, 2021

Hi,

there were no updates for cufft in Cuda 11.1 and only little in Cuda 11.0, hence no changes in managedCuda.
cudnn is a different story. Nvidia releases it independently of Cuda and I haven't found the time to update for every single release. It is therefor lagging a bit behind...

Michael

@solarflarefx
Copy link
Author

@kunzmi Thanks for the reply. I am not sure exactly what the root cause of my problem is but I observed the following. I am using ManagedCuda with other APIs that use CUDA. Prior to this month, I had been using CUDA 10.1 and the various APIs seemed to be working fine. But recently I tried upgrading everything to use CUDA 11.x and started having some problems with ManagedCuda. In particular the issue seems to be around CudaFFTPlan1D. In my new CUDA 11.x environment if I try releasing a CUDAFFTPlan1D object, for some reason CudaContext.Flags changes from SchedAuto to MapHost and then I have problems elsewhere in my code. This same behavior does not occur when using other APIs that use CUDA 10.1. At first I thought this could be related to not using an updated version of cuFFT. What do you think?

@kunzmi
Copy link
Owner

kunzmi commented Jan 26, 2021

My guess is that you're not using a PrimaryContext but a standard CudaContext. When using Cuda libraries, Nvidia recommends to use the primaryContext as it is used inside the libraries and with the runtime API (managedCuda is based on the driver API). When using the standard context, with the first use of a Cuda library you actually switch to a new context without being notified, why you might see different flags being set.
(To check this, you can call .SetCurrent() on your normal context, then you should have your flags being set again)
I also found some new behaviour inside the Cuda libraries in this regard with version 11 onwards.
Note that you have to call .SetCurrent() of the primaryContext after creation.

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

2 participants