GPU Optimization for Python (NVIDIA)
Moves CPU-bound scientific Python to NVIDIA GPUs and proves the port is both correct and genuinely faster.
Dev & CodingAdvanced★ 33,030⑂ 3,248AI score 8/10Last updated: Aug 9, 2026
What it does
- Treats GPU acceleration as an evidence-driven optimization: baseline first, profile, then decide whether porting is worth it.
- Maps your workload to the smallest suitable layer — NumPy→CuPy, pandas→
cudf.pandas/cuDF, scikit-learn→cuml.accel/cuML, NetworkX→nx-cugraph, scikit-image→cuCIM, Faiss/k-NN→cuVS, file I/O→KvikIO, simulation→Warp/Newton, low-level→RAFT. - Enforces correct GPU benchmarking (CUDA events,
cupyx.profiler.benchmark, Nsight Systems/Compute) instead of timing async enqueues. - Validates numerics against CPU with explicit tolerances, reports recall@k for approximate search, and flags silent CPU fallbacks.
- Flags sunset/archived projects (cuxfilter, cuSpatial) and suggests modern replacements.
Who it's for
- Researchers, data scientists, and ML engineers working with large arrays, dataframes, or graphs.
- Teams evaluating RAPIDS for the first time and unsure which library fits.
- Anyone with existing GPU code who wants trustworthy speed and accuracy measurements.
Examples
- "My 50M-row pandas groupby is too slow" → start with
cudf.pandasaccelerator mode, fall back to native cuDF, and benchmark end-to-end including transfers. - "Speed up my RAG retrieval built on sklearn NearestNeighbors" → port to cuVS and report recall@k versus exact search.
- "NetworkX PageRank takes hours" → enable the nx-cugraph backend with near-zero code change and inspect logs for CPU fallback.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/K-Dense-AI/scientific-agent-skills/HEAD/skills/optimize-for-gpu/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/optimize-for-gpu folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/optimize-for-gpu/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git /tmp/sas && mkdir -p ~/.claude/skills && cp -r /tmp/sas/skills/optimize-for-gpu ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Confirm you have an NVIDIA CUDA-capable GPU on Linux or WSL2 with Python 3.11+.
- Clone the repository:
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git - Copy the skill folder:
mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/optimize-for-gpu ~/.claude/skills/ - Verify the
references/subfolder came along — it holds the per-library API guides the skill reads before writing code. - Restart Claude Code and ask something like "optimize this NumPy pipeline for my GPU" to trigger the skill.
- Install the GPU packages (CuPy, RAPIDS, Warp, etc.) matching your CUDA version, following
references/installation.md.
View source on GitHub ↗License: MIT