Skip to content

Detect CUDA in sweep skills and exercise GPU paths when available#1497

Merged
brendancol merged 1 commit intomainfrom
sweep-cuda-detection
May 6, 2026
Merged

Detect CUDA in sweep skills and exercise GPU paths when available#1497
brendancol merged 1 commit intomainfrom
sweep-cuda-detection

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

Summary

  • Each sweep skill (sweep-accuracy, sweep-api-consistency, sweep-metadata, sweep-performance, sweep-security, sweep-test-coverage) now probes the host with numba.cuda.is_available() before dispatching subagents and passes a CUDA_AVAILABLE flag into the agent prompt.
  • On a CUDA host, subagents run cupy and dask+cupy backends end-to-end during audit and /rockout verification. Each sweep gets a tailored block — accuracy runs the kernel on small inputs, performance times the GPU path, security tests adversarial shapes, metadata checks attrs/coords/dims on cupy DataArrays, api-consistency smoke-tests cupy entry points, and test-coverage requires new cupy tests to execute locally.
  • On a CPU-only host, subagents fall back to static review and tag the state CSV's notes column with cuda-unavailable so a future re-run on a GPU host knows to re-validate the GPU paths.

Test plan

  • Run /sweep-performance --top 1 on a CUDA host; confirm the dispatched subagent receives CUDA_AVAILABLE=true and exercises the cupy path
  • Run the same sweep on a CPU-only host; confirm the state CSV row carries the cuda-unavailable note
  • Spot-check that the rendered prompt for each of the six sweeps contains the CUDA instruction block

Each sweep skill now probes the host with `numba.cuda.is_available()`
before dispatching subagents and passes a `CUDA_AVAILABLE` flag into
the agent prompt. On a CUDA host, subagents run cupy and dask+cupy
backends end-to-end during audit and /rockout verification. On a
CPU-only host, they fall back to static review and tag the state CSV
with `cuda-unavailable` so a future re-run on a GPU host knows to
re-validate the GPU paths.
@github-actions github-actions Bot added the performance PR touches performance-sensitive code label May 6, 2026
@brendancol brendancol merged commit ac48fbe into main May 6, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance PR touches performance-sensitive code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant