Commit fa254a5
Polish green context API: docs, error handling, simplification
- dev.create_context raises ValueError (not NotImplementedError) when
options or resources are missing.
- Cache version checks (_check_green_ctx_support, _check_workqueue_support)
at module level; raise ValueError instead of NotImplementedError.
- Simplify _device_resources.pyx: merge _as_uint and _count_to_sm_count
into _to_sm_count; inline unsigned int casts for coscheduled params.
- Add green context classes to api.rst (Context, ContextOptions,
DeviceResources, SMResource, SMResourceOptions, WorkqueueResource,
WorkqueueResourceOptions).
- Update all docstrings to NumPy style with Attributes/Parameters/Returns
sections matching the existing codebase convention.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 340506e commit fa254a5
6 files changed
Lines changed: 171 additions & 94 deletions
File tree
- cuda_core
- cuda/core
- docs/source
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1302 | 1302 | | |
1303 | 1303 | | |
1304 | 1304 | | |
1305 | | - | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
1306 | 1308 | | |
1307 | 1309 | | |
1308 | 1310 | | |
1309 | | - | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
1310 | 1314 | | |
1311 | 1315 | | |
1312 | 1316 | | |
| |||
1334 | 1338 | | |
1335 | 1339 | | |
1336 | 1340 | | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
1340 | 1344 | | |
1341 | 1345 | | |
1342 | 1346 | | |
| |||
0 commit comments