-
Notifications
You must be signed in to change notification settings - Fork 197
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
Update to Cython 3.0.0 #1313
Update to Cython 3.0.0 #1313
Conversation
There are a couple of outstanding warnings that I'm not sure how we want to resolve:
These come from type annotations, one in an argument |
memory_resource.pyx needs |
For this one, it appears using |
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.
Pending resolving the remaining warnings
Good catches! I didn't consider that Cython would need these imported since they typically work out of the box, but I guess for typing annotations it's stricter (which is good I suppose). The proposed fixes worked (with one minor edit, |
/merge |
Description
This PR contains the minimal set of changes to compile using Cython 3 without warnings. Future PRs can be made to take advantage of new or improved features.
The specific changes are:
nogil
always comes afterexcept
.except * nogil
is a compile-time error in Cython 3noexcept
orexcept *
to anycdef
functions missing them. In Cython 0.29 these would default tonoexcept
, which meant that exceptions would not be properly propagated. In Cython 3.0.0, these default toexcept *
, which incurs a performance penalty for reacquiring the GIL to check the exception value even fornogil
functions. Being explicit here is important.There are a large number of outstanding warnings due to NVIDIA/cuda-python#44. cuda-python for CUDA 12 has the necessary fix, but we will need a cuda-python 11.8.* bugfix with a backport to make those warnings go away.
Checklist