0Pricing
CUDA Academy · Lección

Métricas de kernels en Nsight Compute

Datos de rendimiento, esperas y roofline.

Métricas de kernels en Nsight Compute es una lección gratuita de CUDA Academy en CoddyKit. Esta es la lección 2 de 4. Puedes leer la lección completa abajo gratuitamente — luego la practicas en el navegador con un editor de código integrado y un tutor de IA 24/7. Forma parte de la ruta de aprendizaje de CUDA Academy, y tu progreso se sincroniza en la web y la app de CoddyKit. El curso de CUDA Academy incluye 4 lecciones en total.

Partes de esta lección aún no han sido traducidas y se muestran en inglés.

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. 👏

Preguntas frecuentes

¿La lección «Métricas de kernels en Nsight Compute» es gratis?

Sí — el texto completo de «Métricas de kernels en Nsight Compute» es gratis para leer aquí en la web. Para practicarla de forma interactiva (editor de código integrado y tutor de IA 24/7) y desbloquear el resto del curso de CUDA Academy, actualiza a CoddyKit PRO. El curso de CUDA Academy incluye 4 lecciones en total.

¿Qué aprenderé en «Métricas de kernels en Nsight Compute»?

Datos de rendimiento, esperas y roofline. Practicas CUDA Academy con código real que ejecutas directamente en el navegador, y un tutor de IA 24/7 responde tus preguntas mientras trabajas en la lección.

¿Necesito experiencia previa para empezar CUDA Academy?

No se requiere experiencia previa. CUDA Academy en CoddyKit está estructurado para principiantes hasta estudiantes avanzados, así que puedes empezar aquí o desde el inicio y avanzar a tu ritmo. Esta es la lección 2 de 4.

¿Cuánto tiempo toma la lección «Métricas de kernels en Nsight Compute»?

La mayoría de las lecciones de CoddyKit toman alrededor de 5–10 minutos. Cada una es compacta e interactiva, así que avanzas constantemente y retomas exactamente por donde dejaste en la web y la app.

¿Puedo escribir y ejecutar código en esta lección de CUDA Academy?

Sí. Cada lección de CUDA Academy incluye un editor de código integrado, así que escribes y ejecutas código real directamente en tu navegador y obtienes retroalimentación instantánea de IA — sin configuración local necesaria.

Todas las lecciones de este curso

  1. Vista de línea temporal en Nsight Systems
  2. Métricas de kernels en Nsight Compute
  3. Limitado por cómputo frente a limitado por memoria
  4. Anotar código con NVTX
← Volver a CUDA Academy