0Pricing
CUDA Academy · Lesson

Kernel Metrics in Nsight Compute

Throughput, stalls, and roofline data.

Kernel Metrics in Nsight Compute is a free CUDA Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the CUDA Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Zoom Into One Kernel

Nsight Compute is the microscope for a single kernel. It collects deep hardware metrics so you can see exactly why it runs slow. 🔬

How to Launch It

You profile a kernel with ncu from the command line. It replays the kernel many times to gather detailed counters.

ncu -o report ./my_cuda_app

Throughput Metrics

The first thing to read is throughput: how busy the compute units and memory pipes are, shown as a percent of their peak.

Reading Warp Stalls

A stall is a warp that cannot make progress this cycle. Nsight Compute groups stalls by reason so you know what to fix.

Memory Stalls

If most stalls say memory, your kernel waits on data. The cure is better access patterns or reuse, not more math.

Achieved Occupancy

Achieved occupancy shows how many warps were actually active versus the maximum. Low values often mean too few warps to hide latency.

The Roofline Chart

The roofline plots your kernel against hardware limits. Where the dot lands tells you if compute or memory is the wall.

Guided Analysis

Nsight Compute writes plain-language recommendations. It points at the biggest bottleneck so you do not have to guess first.

Cache Hit Rates

Counters for the L1 and L2 caches show how often reads hit cache. Higher hit rates mean fewer trips to slow global memory.

Comparing Two Versions

You can diff two reports side by side. That makes it obvious whether your latest change truly helped the metrics.

It Replays, So It Is Slow

Because it replays kernels, profiling overhead is high. Use it on one kernel at a time, not as a normal run.

Quick Check

Your kernel report shows mostly memory-related warp stalls.

Recap

Nsight Compute reveals one kernel's metrics: throughput, stalls, occupancy, and roofline. Use it to confirm exactly what to optimize. 👏

Frequently asked questions

Is the “Kernel Metrics in Nsight Compute” lesson free?

Yes — the full text of “Kernel Metrics in Nsight Compute” is free to read here on the web, and the CUDA Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the CUDA Academy course, upgrade to CoddyKit PRO.

What will I learn in “Kernel Metrics in Nsight Compute”?

Throughput, stalls, and roofline data. You practise CUDA Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start CUDA Academy?

No prior experience is required. CUDA Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Kernel Metrics in Nsight Compute” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this CUDA Academy lesson?

Yes. Every CUDA Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Timeline View in Nsight Systems
  2. Kernel Metrics in Nsight Compute
  3. Compute-Bound vs Memory-Bound
  4. Annotating Code with NVTX
← Back to CUDA Academy