Commit ac5c0fc
Expand green context test coverage with proper pytest patterns
Restructure tests into fixtures + classes with full resource cleanup:
- Fixtures: sm_resource, wq_resource, green_ctx (with CUDAError skip),
green_ctx_active (with try/finally restore), fill_kernel
- _use_green_ctx context manager for safe push/pop in all tests
- TestSMResourceQuery: properties, arch constraints per CC
- TestSMResourceSplit: single/two-group splits, discovery, alignment,
dry-run vs real parity
- TestGreenContextKernelLaunch: compile + launch + verify in green ctx,
two independent green contexts, SM + workqueue combined
All set_current calls are paired with restore in finally blocks to
prevent context stack leaks on test failure.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent da58b7d commit ac5c0fc
1 file changed
Lines changed: 320 additions & 76 deletions
0 commit comments