Skip to content

GPU Optimization for Python

Speeds up scientific Python on NVIDIA GPUs and checks that results stay correct and faster.

Stars
55,780
Licence
MIT
Files
10 files

What it does

Once installed, the agent looks at slow NumPy, pandas, scikit-learn, graph, image or simulation code and considers moving it onto an NVIDIA GPU using libraries such as CuPy, cuDF, cuML and cuGraph. It is designed to be cautious: it first asks for representative data and expected outputs, measures the current speed, and keeps the GPU version only if end-to-end benchmarks show a real improvement with matching results. The skill's own text notes that its examples are not tested on GPU hardware and must be validated on the user's machine before correctness or speedup is reported.

Great for

  • Researchers or engineers with slow NumPy, pandas or scikit-learn code on large datasets who have an NVIDIA GPU
  • Developers porting CPU-bound Python pipelines (graph analytics, vector search, image processing) to GPU libraries
  • Teams who want benchmarks and correctness checks before adopting GPU code

Skip it if

  • Machines without an NVIDIA CUDA-capable GPU, since GPU execution is not possible (the skill also does not support Mac or Windows outside WSL2)
  • Small or quick scripts where GPU setup and data transfer would cost more than they save
  • Production code run without review: the skill edits code and may install packages, so changes should be tested before deployment

Try asking

  • “Speed up this pandas groupby on a 50 GB CSV and check the results match the CPU version”
  • “Port my scikit-learn KMeans and NearestNeighbors pipeline to the GPU and benchmark it”
  • “Move this NetworkX PageRank over a million-edge graph to nx-cugraph”
  • “Profile my NumPy simulation loop and tell me whether a GPU version is worth it”
Step-by-step guide: how to use GPU Optimization for PythonInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 10 original files, the MIT licence and an attribution note.

    optimize-for-gpu.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip optimize-for-gpu.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip optimize-for-gpu.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Give the agent a representative sample input and the expected output so it can verify correctness
  • Ask for synchronized end-to-end timings including data transfer, not just kernel speed
  • Validate any generated GPU code on your own hardware before trusting reported speedups

What's inside

  • references/code_transformation_patterns.md
  • references/cucim.md
  • references/cudf.md
  • references/cugraph.md
  • references/cuml.md
  • references/cupy.md
  • references/cuspatial.md
  • references/cuvs.md
  • references/cuxfilter.md
  • SKILL.md

Redistributed unmodified from K-Dense-AI/scientific-agent-skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.