Skip to content

Investigate using __pyx_capi__ to simplify resource handle architecture #1450

@Andy-Jost

Description

@Andy-Jost

Summary

PR #1368 introduces a PyCapsule-based architecture for resource handles. This issue is to investigate whether Cython's __pyx_capi__ mechanism could simplify or replace this approach.

Current Architecture

PR #1368 uses a PyCapsule mechanism _CUDA_DRIVER_API_V1 to pass CUDA driver function pointers from cuda.bindings to the C++ code

Proposed Investigation

Investigate whether __pyx_capi__ (Cython's built-in mechanism for exposing C-level APIs) could replace this capsule:

  • Can cuda.bindings expose driver functions via __pyx_capi__ instead of requiring a custom capsule?

References

Goal

Simplify the architecture if possible, reducing complexity and maintenance burden while preserving the core benefits of centralized resource lifetime management.

Metadata

Metadata

Assignees

Labels

cuda.coreEverything related to the cuda.core moduleenhancementAny code-related improvements

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions