You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cuda.bindings: make cythonization warnings clean #2450
A recent PR added -Werror to the cythonization step in cuda.core. This fails a build when cython warns about code issues (see the mentioned PR for examples).
We want to add the -Werror flag to the cythonization step in cuda.bindings as well but first need to work on the cybind bindings generator for it to produce warnings-free cython code.
Inventory (local Cythonize of cuda.bindings with warning_errors=True against CTK headers from pip wheels):
cudla.pxd / cudla.pyx — noexcept clause is ignored for function returning Python object on device_get_attribute / module_get_attributes (except * on Python-returning cpdefs)
_lib/windll.pxd — Assignment in pxd file will not be executed for LOAD_LIBRARY_SEARCH_SYSTEM32
Fix (see upcoming PR):
Remove ignored except * on those cudla cpdefs (resealed)
Declare the Win32 flag as const DWORD (hand-written _lib)
Enable _CythonOptions.warning_errors = True in cuda_bindings/build_hooks.py
Add source-level regression tests
Note for cybind: the cudla emitter should stop attaching exception clauses to cpdefs that return Python objects, so the next sync does not reintroduce warning (1).
Whenever you have time, I'd really appreciate a review (and assigning yourself as reviewer if that's helpful). I'm happy to make any changes you suggest.
Activity
atiaomar1978-hub commentedon Jul 31, 2026
Working on this in a PR.
Inventory (local Cythonize of
cuda.bindingswithwarning_errors=Trueagainst CTK headers from pip wheels):cudla.pxd/cudla.pyx—noexcept clause is ignored for function returning Python objectondevice_get_attribute/module_get_attributes(except *on Python-returningcpdefs)_lib/windll.pxd—Assignment in pxd file will not be executedforLOAD_LIBRARY_SEARCH_SYSTEM32Fix (see upcoming PR):
except *on those cudla cpdefs (resealed)const DWORD(hand-written_lib)_CythonOptions.warning_errors = Trueincuda_bindings/build_hooks.pyNote for cybind: the cudla emitter should stop attaching exception clauses to
cpdefs that return Python objects, so the next sync does not reintroduce warning (1).atiaomar1978-hub commentedon Jul 31, 2026
PR opened: #2463
atiaomar1978-hub commentedon Jul 31, 2026
Hi maintainers — I've opened a fix for this in #2463 and would like to continue owning the follow-through (review feedback, cybind sync note, CI).
Could you please assign this issue to me (@atiaomar1978-hub)? Happy to adjust the PR based on your guidance.
atiaomar1978-hub commentedon Aug 4, 2026
Follow-up: the fix PR is ready at #2463 (still awaiting CPR vetting + review).
Could a maintainer please assign this issue to me (@atiaomar1978-hub)? I’ll keep owning review feedback and any follow-ups.
cc @juenglin
atiaomar1978-hub commentedon Aug 11, 2026
Hi @juenglin,
Thank you for assigning this issue to me, and for the helpful guidance on coordinating with the
cybindgenerator work.I've prepared a PR for this: #2463
Whenever you have time, I'd really appreciate a review (and assigning yourself as reviewer if that's helpful). I'm happy to make any changes you suggest.
Thanks again for your support.
fix(cuda.bindings): make cythonization warning-clean and enable -Werr…
Prepare for 13.4.1 release (#2788)
Pull 13.4.1 changes into main (#2789)