Unable Initialize Cuda

Version : 2021.10330
OS : windows

If i try to load a custom cuda TOP operator that was working fine in 2020.28110 in get a “Unable initialize CUDA error”.

I try to compile the CudaTop examples that ship with 2021.10330 and i get the same error.
Cheers,
Colas

10330 has upgraded to CUDA 11.2 - maybe you 'll need to match your dev environment to that?

CUDA 11.2 requires the newest graphics drivers. The error should be telling you that, I’ll look into why it’s not. If you upgrade your graphics driver, does that fix it?

@Tyrell were you able to get things working with newer GPU drivers?

@malcolm sorry i didn’t had the time to try.
I will try to test that soon

Hi @malcolm,

I am also unable to load a CUDA C++ TOP, this time in TD 2022.32660, using CUDA 11.2 and the latest driver for my GPU (531.79) on Windows 11. The plugin I’m trying to use is something custom, but for example this one from @josefpelz also doesn’t work for me:

https://github.com/JosefPelz/TDSortParticles

Any ideas for a fix?

Thank you!
Jonas
WV

If you use other CUDA required nodes, such as the Spectrum TOP, does that work? That error is at the very high level, where it’s just trying to initialize CUDA on your system. The version installed or that you are using to compile against doesn’t matter, since the CUDA drivers is part of your GPU drivers.

SpectrumTOP also doesn’t work for me. Connecting a node or trying to open snippets crashes TD in build 2022.32660.

However, it does work in 2022.32120 and 2022.31030. Loading the CudaTOP plugin compiled from the samples folder also works (as does the sorting one from Josef):

Sorry, Spectrum was a bad test since it’s busted in 32660.
What error do you get in 32660 when you try to load the CudaTOP.dll? Same one as sortParticles?
Does encoding H264 using the Movie File Out TOP work for you?

Yes, I get the same error about Cuda not initializing when loading the CudaTOP from samples, also doesn’t matter if via C++ TOP or from Plugins/ directory as a custom op.

I’m afk so can’t check the moviefileoutTOP at the moment but can try this Monday at the latest when I am back at the office.

Jonas

Can you also try this build, it may give more useful errors:

1 Like

Well, looks like reinstalling my GPU drivers (version 531.79) fixed the issue. I can now load all CUDA-enabled TOPs that previously didn’t work (the CudaTOP example, sortParticles, etc.) in all TD builds I tried before (32120, 32660 and also the one you sent - 33420). h264 export works, too. SpectrumTOP remains broken, but this is to be expected if you’re saying it is currently not working anyway.

I’ve been previously experimenting with several releases of the CUDA toolkit and was installing / reinstalling and removing various versions. So perhaps in that process some parts of the drivers got corrupted (not sure this is plausible?).

Anyway, thanks @malcolm!

The CUDA Toolkit installer does mess with the drivers, so it’s possible they got into a bad state. It is really the only explanation for this, since the error was at a simple CUDA initialization call.

1 Like