Uh oh!
There was an error while loading. Please reload this page.
Fix #789: Remove cycle between c.b.cyruntime and c.b._lib.cyruntime.cyruntime - #914
Conversation
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
mdboom
commented
Aug 27, 2025
/ok to test |
This comment has been minimized.
This comment has been minimized.
leofang
left a comment
There was a problem hiding this comment.
LGTM overall! Left a few questions. Is this still WIP (since it's in the draft state)?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
mdboom
commented
Aug 27, 2025
No, it's ready for review. I didn't notice I created a draft... |
mdboom
commented
Aug 27, 2025
/ok to test |
kkraus14
commented
Aug 27, 2025
I poked around the generated It looks like when you cimport something it adds a declaration, i.e. for
staticcudaError_t (*__pyx_f_4cuda_8bindings_4_lib_9cyruntime_5utils_getDriverEglFrame)(__pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *, __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame); /*proto*/
if (__Pyx_ImportFunction_3_0_12(__pyx_t_1, "getDriverEglFrame", (void (**)(void))&__pyx_f_4cuda_8bindings_4_lib_9cyruntime_5utils_getDriverEglFrame, "cudaError_t (__pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *, __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)So there's zero linkage happening and everything is declared as static. The symbol resolution is happening via the I think this effectively means we can treat Cython the same way we treat Python where we only need to worry about API compatibility, except for externed vs non-externed declarations in |
mdboom
commented
Aug 27, 2025
/ok to test |
mdboom
commented
Aug 27, 2025
/ok to test |
Uh oh!
There was an error while loading. Please reload this page.
mdboom
commented
Aug 28, 2025
/ok to test |
mdboom
commented
Aug 28, 2025
/ok to test |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
leofang
commented
Aug 28, 2025
Thanks a lot @mdboom! |
|
This now textually includes
cuda.bindings._lib.cyruntime.cyruntimeincuda.bindings._bindings.cyruntimeto remove the cycle.Since this is only /adding/ symbols to
cuda.bindings._bindings.cyruntime, I believe it isn't breaking ABI compatibility (but I admittedly am only now getting used to "Cython ABI compatibility"). The oldcuda.bindings._lib.cyruntime.cyruntimeandcuda.bindings._lib.cyruntime.utilsare just removed, but since those were private, I think we ok for ABI there, too.I also discovered a bug in the test for cycles that was finding erroneous cycles when
ImportErrors were raised and caught.Description
closes
Checklist