-
Notifications
You must be signed in to change notification settings - Fork 217
Fix #789: Remove cycle between c.b.cyruntime and c.b._lib.cyruntime.cyruntime #914
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
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. |
/ok to test |
This comment has been minimized.
This comment has been minimized.
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.
LGTM overall! Left a few questions. Is this still WIP (since it's in the draft state)?
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. |
No, it's ready for review. I didn't notice I created a draft... |
/ok to test |
I poked around the generated It looks like when you cimport something it adds a declaration, i.e. for
static cudaError_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 |
/ok to test |
/ok to test |
/ok to test |
/ok to test |
Thanks a lot @mdboom! |
|
This now textually includes
cuda.bindings._lib.cyruntime.cyruntime
incuda.bindings._bindings.cyruntime
to 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.cyruntime
andcuda.bindings._lib.cyruntime.utils
are 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
ImportError
s were raised and caught.Description
closes
Checklist