This repository contains experimental code and examples related to managing CUDA resources in Python and C++.
The primary design goal is to provide referentially transparent handles for CUDA resources. These handles:
- Encapsulate ownership and lifetime of resources such as streams, contexts, and device pointers.
- Can be passed safely across Python and C++ boundaries.
- Ensure resources remain valid while handles exist, without global lifetime tracking.
The full design rationale, examples, and alternative implementation strategies are documented in detail.
Please see the full design document for an in-depth explanation, example implementations, and discussion of alternative approaches:
CUDA Core Handle Design Document
This repository contains experimental code for internal exploration and is not intended as a production-ready library.