-
Notifications
You must be signed in to change notification settings - Fork 74
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
cuKernelGetFunction Segmentation fault (core dumped) #129
Comments
What's the CUDA Python version? CUDA Driver version (as ported via nvidia-smi)? |
@leofang Hello!
|
Hi @CallmeZhangChenchen you still have not provided the CUDA Python version. It can be accessed via either |
I took a cursory glance and wasn't able to reproduce with the latest CUDA Python. However as I was setting up my local test, I made a mistake that caused a segfault: I mixed up how I was loading my data (cuModuleLoadData vs. cuLibraryLoadData) and my downstream API segfaulted. The following call order is what ended up working:
Could you have had a similar mix up? If not, then a minimal repro would help us a lot in seeing why I wasn't able to reproduce your issue. |
Hi @vzhurba01 @leofang Thank you for your help. cuda-python 12.6.0 I used it wrong. I used cuModuleLoadData -> cuModuleGetFunction -> cuKernelGetAttribute -> cuKernelGetFunction However, I don't know how to use cuLibraryLoadFromFile and how to change parameters. |
Thanks, @vzhurba01. That's a reasonable guess. Glad it helped @CallmeZhangChenchen! @CallmeZhangChenchen For this particular use case, please check out the devblog https://developer.nvidia.com/blog/cuda-context-independent-module-loading, sometimes our devblogs come out sooner than official documentations 😅 Generally speaking, however, the documentation for the entire CUDA API surface is unfortunately pretty lacking and CUDA Python is not the only victim; the same applies to CUDA C/C++ too. Right now, CUDA Python's API Reference is largely copied and pasted from the CUDA Driver, Runtime, and NVRTC API references (through parsing the same Doxygen docstrings in the CUDA headers that are also used to generate the C API references), with minor changes. For actually learning how to use the C APIs (and their Python bindings) I would recommend:
The team is working on a more comprehensive CUDA Python user guide (cc @aterrel @nv-kriehl) and a few preview chapters are already available in https://github.com/NVIDIA/accelerated-computing-hub. In the long term, the idea is to provide a pythonic CUDA module
is already covered in the |
Since the question was answered/addressed, let us close this issue. |
FYI, you have CUDA driver 12.4 (as reported by |
The text was updated successfully, but these errors were encountered: