Fix issues discovered during v0.6.0 integration testing#1660
Merged
leofang merged 3 commits intoNVIDIA:mainfrom Feb 20, 2026
Merged
Fix issues discovered during v0.6.0 integration testing#1660leofang merged 3 commits intoNVIDIA:mainfrom
leofang merged 3 commits intoNVIDIA:mainfrom
Conversation
Contributor
Contributor
Author
|
cc @brandon-b-miller — this restores the private |
Contributor
Author
|
/ok to test 68bd7fb |
mdboom
reviewed
Feb 19, 2026
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
@mdboom Tried it — Cython rejects |
Member
|
Brandon will be verifying with numba-cuda locally. |
rparolin
approved these changes
Feb 19, 2026
…mpat Adds _handle properties that delegate to .handle on Context and Kernel, preserving backward compatibility for downstream projects (e.g., numba-cuda) that relied on the private attribute. Co-authored-by: Cursor <cursoragent@cursor.com>
68bd7fb to
a6f091e
Compare
Contributor
Author
|
/ok to test a6f091e |
- Convert @classmethod to @staticmethod for pickle callables in ObjectCode, IPCEventDescriptor, IPCBufferDescriptor, and Buffer to fix pickle identity check failures in Cython cdef classes - Comment out cuLibraryUnload calls in LibraryBox deleters to prevent potential segfaults when owning context is destroyed before library - Guard ml_dtypes import in test_utils.py as optional dependency Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
|
/ok to test 550c20e |
leofang
approved these changes
Feb 20, 2026
leofang
reviewed
Feb 20, 2026
Comment on lines
-753
to
+754
| p_cuLibraryUnload(b->resource); | ||
| // TODO: re-enable once LibraryBox tracks its owning context | ||
| // p_cuLibraryUnload(b->resource); |
Member
There was a problem hiding this comment.
Note for posterity: This restores the old behavior since cuda.core 0.1.0 (this was changed when module/library was cythonized).
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_handleas a property onContextandKernelthat delegates to the public.handleproperty, providing backward compatibility for downstream projects (e.g., numba-cuda) that relied on the private attribute removed during the resource handles refactoringcdef classtypes (ObjectCode,IPCEventDescriptor,IPCBufferDescriptor,Buffer) where@classmethodcallables in__reduce__fail pickle's identity checkcuLibraryUnloadinLibraryBoxdeleters to prevent potential segfaults when the owning context is destroyed before the library (to be re-enabled onceLibraryBoxtracks its owning context)0.6.0to the docs version switcher (nv-versions.json)ml_dtypesimport intest_utils.pyas an optional dependencyChanges
_context.pyx: Add_handleproperty that returnsself.handle_module.pyx: Add_handleproperty onKernelthat returnsself.handle; convertObjectCode._reduce_helperfrom@classmethodto@staticmethod_event.pyx: ConvertIPCEventDescriptor._initfrom@classmethodto@staticmethod_memory/_buffer.pyx: Add@staticmethod _reduce_helperforBuffer.__reduce___memory/_ipc.pyx: ConvertIPCBufferDescriptor._initfrom@classmethodto@staticmethod_cpp/resource_handles.cpp: Comment outcuLibraryUnloadcalls inLibraryBoxdeletersdocs/nv-versions.json: Add0.6.0entrytests/test_utils.py: Guardml_dtypesimport with try/except and add skip markersTest Coverage
ObjectCodeverified manually_handleproperty delegates to existing.handlewhich is already tested_handlepathRelated Work
.handleto accesscuda-coreobjects numba-cuda#794