0Pricing
CUDA Academy · บทเรียน

ตัวชี้วัดเคอร์เนลใน Nsight Compute

อัตราการส่งข้อมูล ช่วงหยุดรอ และข้อมูลเส้นหลังคา

ตัวชี้วัดเคอร์เนลใน Nsight Compute เป็นบทเรียน CUDA Academy ฟรีบน CoddyKit นี่คือบทเรียนที่ 2 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน CUDA Academy และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส CUDA Academy มีบทเรียนทั้งหมด 4 บทเรียน

บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ

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

คำถามที่พบบ่อย

บทเรียน “ตัวชี้วัดเคอร์เนลใน Nsight Compute” ฟรีหรือไม่

ใช่ — ข้อความเต็มของ “ตัวชี้วัดเคอร์เนลใน Nsight Compute” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส CUDA Academy ให้อัปเกรดเป็น CoddyKit PRO คอร์ส CUDA Academy มีบทเรียนทั้งหมด 4 บทเรียน

คุณจะเรียนรู้อะไรในบทเรียน “ตัวชี้วัดเคอร์เนลใน Nsight Compute”

อัตราการส่งข้อมูล ช่วงหยุดรอ และข้อมูลเส้นหลังคา คุณปฏิบัติ CUDA Academy ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน

คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน CUDA Academy หรือไม่

ไม่จำเป็นต้องมีประสบการณ์มาก่อน CUDA Academy บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 2 จากทั้งหมด 4 บทเรียน

บทเรียน “ตัวชี้วัดเคอร์เนลใน Nsight Compute” ใช้เวลานานแค่ไหน

บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย

ฉันเขียนและรันโค้ดในบทเรียน CUDA Academy นี้ได้ไหม

ได้ บทเรียน CUDA Academy ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ

บทเรียนทั้งหมดในหลักสูตรนี้

  1. มุมมองเส้นเวลาใน Nsight Systems
  2. ตัวชี้วัดเคอร์เนลใน Nsight Compute
  3. จำกัดด้วยการคำนวณเทียบกับจำกัดด้วยหน่วยความจำ
  4. ใส่คำอธิบายประกอบโค้ดด้วย NVTX
← กลับไปที่ CUDA Academy