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
Add explicit green context model: ctx.create_stream and ctx.resources
Switch from the v1.0 push model (dev.set_current + dev.create_stream)
to the v1.1 explicit model (ctx.create_stream + ctx.resources) as the
primary way to use green contexts.
Context.create_stream(options):
- Only supported on green contexts (raises on primary contexts).
- Delegates to Stream._init which now detects green contexts via
get_context_green_ctx() and dispatches to cuGreenCtxStreamCreate —
no duplication of stream creation logic.
- New C++ create_stream_handle_for_green_ctx() with function pointer
for cuGreenCtxStreamCreate.
Context.resources:
- Returns a DeviceResources namespace querying this context's resources
(cuCtxGetDevResource / cuGreenCtxGetDevResource), not the full device.
dev.set_current(green_ctx) still works but is not the recommended path.
Tests rewritten to use the explicit model throughout. Push-model
set_current kept as regression tests with _use_green_ctx helper.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments