-
Notifications
You must be signed in to change notification settings - Fork 29
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
devcount()
return zero when none available?
#34
Comments
Yes, that's very reasonable. |
Ah, turns out I only have CUDA 7.0, so I think I can't do that. I don't see any obvious way you accounted for multiple versions, is there? |
I think we can support multiple "gen" directories (it might take a bit of tweaking of the core code, but that part should be pretty easy). Start by making a |
OK I'll try that but It'll take me some time before I get there then, quite busy currently. |
I believe I've generated the bindings (for 7.5, not 7.0, I was mistaken) but I am clueless as to how we should decide which one to include here and here. Any ideas or pointers? Also, even if I generate bindings for 7.5 and can load and use them, we should also apply this fix to the 6.5 folder so that both bindings behave the same. But I don't know how to generate them given I don't have cuda 6.5. I don't think I can easily install multiple cuda versions in Arch linux because it gets installed to |
Nice! Probably the best choice is to do the check in
I volunteer to make that change to the 6.5 folder and test it. |
How about running Otherwise, how would you go about finding out the installed CUDA version? Parsing the output of Maybe it's best to move this or similar to build-time and then call one of these two manually. But do we expect people to re-run Sorry for so many questions, it's the first time I do this 😰 |
Yes, because most people won't have Clang.jl installed and working. CUDA library versioning doesn't seem to have been a big problem so far, I'd say.
Seems reasonable.
I think it's OK to expect people to do a little manual work when they update CUDA. Furthermore, if they don't, but nothing breaks, I wouldn't classify that as a problem. Most of the CUDA API has been pretty stable over many releases, so I don't think it's a catastrophe to get the version wrong. |
Currently,
devcount()
fails with an error if there's no device available, because in that case, it returns thecudaErrorNoDevice
error code. It makes sense for most functions to fail when there's no device, but I'd hopedevcount()
to return zero so I can use it to detect the presence of a CUDA-capable GPU.Or is there another way to determine the availability of a device? (My goal is to not run the GPU-related tests of my package when there's no GPU.)
If you agree with this suggestion, I can write a PR for it, I hope it's as easy as adding that function to this list.
The text was updated successfully, but these errors were encountered: