altimesh / hybridizer-basic-samples

Examples of C# code compiled to GPU by hybridizer
MIT License
237 stars 32 forks source link

ApplicationException: Unknown version of Cuda 122 #110

Open ethanEPCarbon opened 6 months ago

ethanEPCarbon commented 6 months ago

Please make sure items below are checked before creating a new issue:

I'm using VS2022 with the CUDA Toolkit 12.2. I create a new Altimesh Hybridizer sample project CUDA 12.2. Compiling the C# and C++ projects are successful, however when I execute the C# project I get an application exception on this line:

cuda.GetDeviceProperties(out prop, 0);

The exception is as follows:

System.TypeInitializationException: 'The type initializer for 'Hybridizer.Runtime.CUDAImports.cuda' threw an exception.' Inner Exception ApplicationException: Unknown version of Cuda 122

Some details:

{"The type initializer for 'Hybridizer.Runtime.CUDAImports.cuda' threw an exception."} {"Unknown version of Cuda 122"}

Any solution to resolve this error?

ethanEPCarbon commented 6 months ago

It appears that that the select statement in static cuda() hasn't been updated to handle Cuda 12.2 (or anything after Cuda 11.7). Is it possible to update this code?

https://github.com/altimesh/hybridizer-runtime-cudaimports/blob/198bcabff33bcc7397b9924f59a031a7e094165f/src/CUDARuntime/RuntimeAPI/cuda/cuda.cs#L222

JeWaVe commented 5 months ago

Hi,

Thanks for reporting the issue. Unfortunately, we are in the process of moving everything to netcore (with linux support) and this is quite a big development with (very) limited resources. CUDAImports is now open sourced so we encourage you to fork for your own needs and propose a pull request while we focus on netcore/linux/vscode. Really sorry for the inconvenience