optimize-for-gpu

Translate CPU-bound Python workloads to NVIDIA GPU libraries.

74|5|Updated Dec 10, 2025
One-click install
npx skills add https://github.com/dralkh/seerai --skill optimize-for-gpu-dralkh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimize-for-gpu
Source: https://github.com/dralkh/seerai/tree/main/skills/optimize-for-gpu
Command: npx skills add https://github.com/dralkh/seerai --skill optimize-for-gpu-dralkh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you move CPU-bound Python workloads onto NVIDIA GPUs so they run dramatically faster with less manual rewrite effort.

Core Features & Use Cases

  • Library Selection Guidance: Chooses the right GPU stack for array math, dataframes, machine learning, graph analytics, image processing, vector search, geospatial analysis, file IO, and simulation.
  • Code Transformation: Converts common NumPy, pandas, scikit-learn, NetworkX, and scikit-image patterns into CuPy, cuDF, cuML, cuGraph, cuCIM, cuVS, cuSpatial, KvikIO, Numba, or Warp equivalents.
  • Performance Workflow: Emphasizes profiling, minimizing host-device transfers, batching work, and using custom kernels only when needed.
  • Use Case: A researcher with a slow Python analysis pipeline can identify the best GPU library, migrate the bottlenecked parts, and keep the rest of the workflow intact.

Quick Start

Ask the Skill to review your Python code and rewrite the slowest parts for GPU acceleration.

Frequently Asked Questions about optimize-for-gpu

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I accelerate slow pandas and NumPy code using a GPU?

To accelerate slow pandas and NumPy code, translate the bottlenecked operations into GPU equivalents using RAPIDS libraries like cuDF and CuPy, minimizing host-device data transfers to preserve correctness and maximize speed.

What is the best GPU library for machine learning and graph analytics in Python?

For GPU-accelerated machine learning and graph analytics, cuML and cuGraph from the RAPIDS suite provide direct replacements for scikit-learn and NetworkX, allowing you to process large datasets significantly faster.

Can I run scikit-learn and NetworkX workloads on an NVIDIA GPU without rewriting everything?

Yes, you can migrate specific scikit-learn and NetworkX bottlenecks to GPU libraries like cuML and cuGraph, preserving the rest of your scientific Python workflow while minimizing manual rewrite effort and inefficient fallback patterns.

How do I avoid slow data transfers when moving Python arrays to the GPU?

To avoid slow data transfers when moving Python arrays to the GPU, apply performance workflows that emphasize zero-copy data movement, batching workloads, and profiling to ensure data remains on the device during processing.

When should I use Numba or Warp instead of CuPy for GPU optimization?

Use Numba or Warp for custom kernels when pre-existing RAPIDS or CuPy implementations cannot handle specific array, dataframe, or simulation workloads, ensuring you avoid inefficient fallback patterns while optimizing performance.

Does this GPU optimization approach work for image processing and geospatial analysis?

Yes, this GPU optimization approach works for image processing and geospatial analysis by translating scikit-image and related scientific Python scenarios to specialized libraries like cuCIM and cuSpatial for accelerated computation.