-
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
[WIP] Supporting multiple gen-*
directories.
#39
base: master
Are you sure you want to change the base?
Conversation
(It's only being renamed, no changes.)
Sorry I didn't notice this when it came in. I have a grant due middle of next week; ping me if I don't get back to you shortly thereafter. |
No worries, and good luck with the grant! |
# Determine the version of the CUDArt library. | ||
function cudart_version() | ||
a = Cint[0] | ||
ccall((:cudaRuntimeGetVersion,libcudart),UInt32,(Ptr{Cint},),a) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucasb-eyer, I am on Arch Linux, CUDArt
is found under /opt/cuda/lib64
, but this line is returning an invalid version number for me (v0.0.0).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm on Arch too, actually. I hope to find some time this weekend and see if I can reproduce.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucasb-eyer have you had the time to reproduce the issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting this same behaviour on my laptop when using the on-board GPU. Does this happen to be the case for you? It's because in that case, cudaRuntimeGetVersion
gives a bogous return value, 0x00000026
in my case.
How did you get here? Maybe I need to add a better error message somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucasb-eyer can I use the PRIME technology or do I need to set my NVIDIA as the primary card? Are you using proprietary or open source drivers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nouveau doesn't have CUDA support, thus proprietary drivers. Run optirun julia ...
to make it possible to use the discrete GPU. Depending on your system, it may be somewhat finnicky and quite unstable.
Argh, forgot about this again. IIUC, the only holdup is suppressing the "typedefs" at the beginning of the generated file? I haven't used Clang.jl in quite a while now, so I'm a bit rusty and nothing immediately comes to mind. Maybe file an issue over at Clang.jl? However, I don't think it's a disaster to commit this with manual tweaks. As an alternative to deleting the problematic code, you could try defining something that prevents the failure---then the manual tweak would be in a small file and you can include a comment about why it's necessary. |
I also forgot pinging you :-) Yes, your understanding is correct, I'll both try to workaround and ask at Clang.jl and then give an update here. |
@lucasb-eyer is there still interest from your side to work on this? I am working on updating CUDAdrv and I would like to see this merged. |
This is in preparation of #34, but doesn't include the discussed change yet. I decided to determine CUDA's version at import-time because I don't see why we should do so at build-time.
I recommend reviewing commit-by-commit as the first one just adds wrapped code and unnecessarily blows up the diff. The other three are more important.
I've marked this [WIP] because in my case,
wrap_cuda.jl
added the following to the top ofgen_libcudart_h.jl
, which I manually removed. (Because it causes failure due to__LONG_LONG_MAX__
.) Any help in suppressing this is welcome, as I'm at a loss.The following is the output while wrapping. Note how it does state skipping
limits.h
which, on my system, seems to be the origin of most (but not all) of the above.