-
Notifications
You must be signed in to change notification settings - Fork 83
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
BUG: module 'cuda.ccudart' has no attribute '__pyx_capi__' #215
Comments
It seems our Cython trampoline modules |
From the Cython FAQ:
IOW perhaps this is related to the layout? |
Update: We've looked at this internally, and we think monkey-patching diff --git a/cuda_bindings/cuda/ccudart.pyx b/cuda_bindings/cuda/ccudart.pyx
index b32eece..3cef081 100644
--- a/cuda_bindings/cuda/ccudart.pyx
+++ b/cuda_bindings/cuda/ccudart.pyx
@@ -5,3 +5,8 @@ cdef extern from *:
#pragma message ( "The cuda.ccudart module is deprecated and will be removed in a future release, " \
"please switch to use the cuda.bindings.cyruntime module instead." )
"""
+
+
+from cuda.bindings import cyruntime
+__pyx_capi__ = cyruntime.__pyx_capi__
+del cyruntime for all Cython-layer trampoline modules Despite the purpose of
it's been quite stable over the years. It’s taught in the wild:
... and also used in the wild Therefore we believe there's no harm in applying a hacky solution like the above to the short-lived trampolines. |
Vlad is working on a hot fix release 11.8.5 & 12.6.2. |
Hot fix for linux-x64 and linux-aarch64 is now posted. I ran into a build error with Windows where the |
The hot fix for Windows is now posted.
The two tags for this patch are created and this issue can now be closed. |
Thanks @vzhurba01 for verifying the fix and preparing new packages, @vyasr for reporting the issue offline. |
Working with Leo and Bradley to get these on conda-forge too: |
tl;dr: This error happens with
cuda-python
12.6.1 & 11.8.4, the first patch releases with the new layout (#75). To tentatively work around this error, please downgradecuda-python
to either 12.6.0 or below (if you’re using 12.x) or 11.8.3 or below (if you’re using 11.x).This only impacts projects satisfying all of the following conditions:
cimport
); through the Python level (=import
) it should work fineReproducer:
Steps:
pip install "cuda-python==12.6.0"
(build against the "old layout")cythonize -i -3 -f test_cuda_python_abi.pyx
pip install "cuda-python==12.6.1"
(run against the "new layout")python -c "import test_cuda_python_abi; test_cuda_python_abi.test_function()"
Error:
The text was updated successfully, but these errors were encountered: