cuda-roofline-strategy

Classify CUDA kernel bottlenecks from NCU roofline profiles and experiment phase.

3|Updated May 14, 2026
One-click install
npx skills add https://github.com/Romaosir/IF_Romao_kernel_optimize --skill cuda-roofline-strategy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cuda-roofline-strategy
Source: https://github.com/Romaosir/IF_Romao_kernel_optimize/tree/main/skills/b200_skill/cuda-roofline-strategy
Command: npx skills add https://github.com/Romaosir/IF_Romao_kernel_optimize --skill cuda-roofline-strategy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the problem of wasting GPU-kernel optimization experiments by choosing the next technique class without a principled diagnosis of what is currently limiting performance.

Core Features & Use Cases

  • Classifies roofline bottlenecks (compute-bound, bandwidth-bound, occupancy-limited, latency-bound, balanced) from NCU metrics like SM throughput, DRAM/SOL throughput, achieved occupancy, and top warp stall reason.
  • Selects a technique tier using iteration phase (early, mid, late, plateau) so recommendations scale with “how desperate” the run is and whether heavy rewrites are warranted.
  • Supports per-workload refinement to avoid misleading averages by re-profiling slow outlier workloads and adapting dispatch when regimes differ.

Quick Start

Use this Skill when you have a fresh NCU profile and need to decide which category of CUDA kernel optimization to try next based on the current roofline position and your iteration phase.

Frequently Asked Questions about cuda-roofline-strategy

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

FAQPage Schema
How do I determine the next CUDA kernel optimization technique from an NCU profile?

To determine the next CUDA kernel optimization, you classify the roofline bottleneck from NCU metrics like SM throughput, achieved occupancy, and top warp stall reasons. This identifies whether the kernel is compute-bound, bandwidth-bound, occupancy-limited, or latency-limited to guide your next experiment.

What is the best way to choose a CUDA optimization strategy based on iteration phase?

Choosing a CUDA optimization strategy based on iteration phase involves mapping your current stage—early, mid, late, or plateau—to a technique tier. This scales recommendations by how desperate the run is, ensuring heavy rewrites are only suggested when warranted during the iterative kernel optimization loop.

How do I classify roofline bottlenecks using NVIDIA NCU warp stall reasons?

Classifying roofline bottlenecks with NVIDIA NCU involves analyzing SM throughput, DRAM/SOL throughput, and achieved occupancy. You use the top warp stall reason breakdown to refine the classification into compute, bandwidth, occupancy, latency, or balanced-limited behavior for explicit next experiment justification.

Why does my CUDA kernel optimization plateau even with high achieved occupancy?

CUDA kernel optimization can plateau with high achieved occupancy if the kernel is actually compute-bound or latency-limited. Analyzing the roofline position and warp stall breakdown reveals the true limiting factor, preventing wasted experiments on occupancy tuning when other bottlenecks dominate.

Should I re-profile slow outlier workloads separately during CUDA kernel optimization?

You should re-profile slow outlier workloads separately during CUDA kernel optimization to avoid misleading averages. Per-workload refinement adapts dispatch when regimes differ, ensuring the selected technique tier matches the specific roofline position and stall behavior of the outlier.