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
* Begin Cythonization of _program.py
- Rename _program.py to _program.pyx
- Convert Program to cdef class with _program.pxd declarations
- Extract _MembersNeededForFinalize to module-level _ProgramMNFF
(nested classes not allowed in cdef class)
- Add __repr__ method to Program
- Keep ProgramOptions as @DataClass (unchanged)
- Keep weakref.finalize pattern for handle cleanup
* Extract Program helpers to module-level cdef functions
- Move _translate_program_options to Program_translate_options (cdef)
- Move _can_load_generated_ptx to Program_can_load_generated_ptx (cdef)
- Remove unused TYPE_CHECKING import block
- Follow _memory/_buffer.pyx helper function patterns
* Complete Cythonization of _program.py
- Reorganize file structure per developer guide (principal class first)
- Add module docstring, __all__, type alias section
- Factor long methods into cdef inline helpers
- Add proper exception specs to cdef functions
- Fix docstrings (use :class: refs, public paths)
- Add type annotations to public methods
- Inline _nvvm_exception_manager (single use)
- Remove Union import, use | syntax
- Add public Program.driver_can_load_nvrtc_ptx_output() API
- Update tests to use new public API
Closes#1082
* Extend test_object_protocols.py with Program and ObjectCode variations
Add fixtures for different Program backends (NVRTC, PTX, NVVM) and
ObjectCode code types (cubin, PTX, LTOIR). Split API_TYPES into more
precise HASH_TYPES, EQ_TYPES, and WEAKREF_TYPES lists. Derive
DICT_KEY_TYPES and WEAK_KEY_TYPES for collection tests.
* Add NVRTC/NVVM resource handles and remove Program MNFF
- Add NvrtcProgramHandle and NvvmProgramHandle to resource handles module
- Add function pointer initialization for nvrtcDestroyProgram and nvvmDestroyProgram
- Forward-declare nvvmProgram to avoid nvvm.h dependency
- Refactor detail::make_py to accept module name parameter
- Remove _ProgramMNFF class from _program.pyx
- Program now uses typed handles directly with RAII cleanup
- Update handle property to return None when handle is null
* Add HANDLE_RETURN_NVRTC and HANDLE_RETURN_NVVM, simplify HANDLE_RETURN
- Add NVVMError exception class
- Add HANDLE_RETURN_NVRTC for nogil NVRTC error handling with program log
- Add HANDLE_RETURN_NVVM for nogil NVVM error handling with program log
- Remove vestigial supported_error_type fused type
- Simplify HANDLE_RETURN to directly take cydriver.CUresult
* Fix build errors, update tests, remove unused imports
- Change cdef function return types from ObjectCode to object (Cython limitation)
- Remove unused imports: intptr_t, NvrtcProgramHandle, NvvmProgramHandle, as_intptr
- Update as_py(NvvmProgramHandle) to return Python int via PyLong_FromSsize_t
- Update test assertions: remove handle checks after close(), test idempotency instead
- Update NVVM error message regex to match new unified format
* Address review feedback: keep _can_load_generated_ptx private, update SPDX dates
- Remove Program.driver_can_load_nvrtc_ptx_output() public static method
- Make _can_load_generated_ptx a cpdef (callable from Python tests)
- Update tests to import _can_load_generated_ptx from cuda.core._program
- Update SPDX copyright years to 2024-2026 for files with 2024-2025
- Update get_kernel docstring: name parameter is str | bytes
Co-authored-by: Cursor <cursoragent@cursor.com>
* Address review feedback: NVVMError inherits from nvvmError, clean up error helpers
- Make NVVMError inherit from cuda.bindings.nvvm.nvvmError for compatibility
with code catching nvvmError, while also inheriting from CUDAError
- Simplify HANDLE_RETURN_NVRTC and HANDLE_RETURN_NVVM to just check success
and delegate to helper functions
- Move all error handling logic into _raise_nvrtc_error and _raise_nvvm_error
Co-authored-by: Cursor <cursoragent@cursor.com>
* Add 0.6.x release notes with cuda-bindings build requirement change
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
0 commit comments