Skip to content

Commit 5d12c79

Browse files
mivertowskiclaude
andcommitted
Add ringkernel-python to CHANGELOG and README for v0.4.0
- Add Python bindings section to CHANGELOG.md with full feature list - Add Python Bindings section to README.md with installation and usage - Add ringkernel-python to crate structure table Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 53254bb commit 5d12c79

2 files changed

Lines changed: 97 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,58 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
This release extracts ~7,000+ lines of proven GPU infrastructure from RustGraph into RingKernel, making these capabilities available to all RingKernel users.
1717

18+
#### Python Bindings (`ringkernel-python`) - **NEW CRATE**
19+
20+
- **PyO3-based Python wrapper** providing Pythonic access to RingKernel
21+
- Full async/await support with `pyo3-async-runtimes` and tokio integration
22+
- Sync fallbacks for all async operations (`create_sync`, `launch_sync`, etc.)
23+
- Type stubs (`.pyi` files) for IDE support and static type checking
24+
- Python 3.8+ compatibility via `abi3-py38`
25+
26+
- **Core Runtime API**:
27+
- `RingKernel.create()` / `create_sync()` - Create runtime with backend selection
28+
- `KernelHandle` - Launch, activate, deactivate, terminate kernels
29+
- `LaunchOptions` - Configure queue capacity, block size, priority
30+
- `MessageId`, `MessageEnvelope` - Message handling primitives
31+
- `HlcTimestamp`, `HlcClock` - Hybrid Logical Clock support
32+
- `K2KBroker`, `K2KEndpoint` - Kernel-to-kernel messaging
33+
- `QueueStats` - Queue monitoring and statistics
34+
35+
- **CUDA Support** (feature-gated via `cuda`):
36+
- `CudaDevice` - Device enumeration and properties
37+
- `GpuMemoryPool` - Stratified GPU memory pool management
38+
- `StreamManager` - Multi-stream execution management
39+
- `ProfilingSession` - GPU profiling and metrics collection
40+
41+
- **Benchmark Framework** (feature-gated via `benchmark`):
42+
- `BenchmarkSuite`, `BenchmarkConfig` - Comprehensive benchmarking
43+
- `BenchmarkResult` - Results with throughput and timing
44+
- Regression detection with baseline comparison
45+
- Multiple report formats (Markdown, JSON, LaTeX)
46+
47+
- **Hybrid Dispatcher**:
48+
- `HybridDispatcher` - Automatic CPU/GPU workload routing
49+
- `HybridConfig`, `ProcessingMode` - Configuration with adaptive thresholds
50+
- `HybridStats` - Execution statistics and threshold learning
51+
52+
- **Resource Management**:
53+
- `ResourceGuard` - Memory limit enforcement with safety margins
54+
- `ReservationGuard` - RAII wrapper for guaranteed allocations
55+
- `MemoryEstimate` - Workload memory estimation
56+
57+
```python
58+
import ringkernel
59+
import asyncio
60+
61+
async def main():
62+
runtime = await ringkernel.RingKernel.create(backend="cpu")
63+
kernel = await runtime.launch("processor", ringkernel.LaunchOptions())
64+
await kernel.terminate()
65+
await runtime.shutdown()
66+
67+
asyncio.run(main())
68+
```
69+
1870
#### PTX Compilation Cache (`ringkernel-cuda/src/compile/`) - **NEW MODULE**
1971

2072
- **`PtxCache`** - Disk-based PTX compilation cache for faster kernel loading

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,50 @@ ringkernel completions bash > ~/.bash_completion.d/ringkernel
9595

9696
Templates available: `basic`, `persistent-actor`, `wavesim`, `enterprise`
9797

98+
## Python Bindings
99+
100+
RingKernel provides Python bindings via PyO3 with full async/await support:
101+
102+
```bash
103+
# Install from PyPI (when published)
104+
pip install ringkernel
105+
106+
# Or build from source
107+
cd crates/ringkernel-python
108+
maturin develop --features cuda,benchmark
109+
```
110+
111+
```python
112+
import ringkernel
113+
import asyncio
114+
115+
async def main():
116+
# Create runtime with CPU backend
117+
runtime = await ringkernel.RingKernel.create(backend="cpu")
118+
119+
# Launch a kernel with options
120+
options = ringkernel.LaunchOptions(queue_capacity=1024)
121+
kernel = await runtime.launch("processor", options)
122+
123+
# Kernel lifecycle
124+
await kernel.deactivate()
125+
await kernel.activate()
126+
await kernel.terminate()
127+
128+
await runtime.shutdown()
129+
130+
asyncio.run(main())
131+
```
132+
133+
**Features:**
134+
- Async/await with sync fallbacks (`create_sync`, `launch_sync`, etc.)
135+
- HLC timestamps and K2K messaging
136+
- CUDA device enumeration and GPU memory pool management
137+
- Benchmark framework with regression detection
138+
- Hybrid CPU/GPU dispatcher with adaptive thresholds
139+
- Resource guard for memory limit enforcement
140+
- Type stubs for IDE support (`.pyi` files)
141+
98142
## Enterprise Runtime
99143

100144
For production deployments, use the enterprise runtime with built-in health checking, circuit breakers, and observability:
@@ -558,6 +602,7 @@ See the [Showcase Applications Guide](docs/15-showcase-applications.md) for deta
558602
| `ringkernel-cuda-codegen` | Rust-to-CUDA transpiler for writing GPU kernels in Rust DSL |
559603
| `ringkernel-wgpu-codegen` | Rust-to-WGSL transpiler for writing GPU kernels in Rust DSL (WebGPU) |
560604
| `ringkernel-ecosystem` | Framework integrations (Actix, Axum, Tower, gRPC) + ML bridges |
605+
| `ringkernel-python` | Python bindings via PyO3 with async/await support |
561606
| `ringkernel-wavesim` | 2D wave simulation with tile-based FDTD, ring kernel actors with K2K messaging, and educational modes |
562607
| `ringkernel-wavesim3d` | 3D acoustic wave simulation with binaural audio, persistent GPU actors (H2K/K2H messaging, K2K halo exchange, cooperative groups), and volumetric rendering |
563608
| `ringkernel-txmon` | Transaction monitoring showcase with GPU-accelerated fraud detection |

0 commit comments

Comments
 (0)