مقاييس النواة في Nsight Compute
بيانات معدل النقل والتوقفات ومخطط السقف.
مقاييس النواة في Nsight Compute درس مجاني في CUDA Academy على CoddyKit. هذا هو الدرس 2 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 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_appThroughput 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» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة CUDA Academy، انتقل إلى CoddyKit PRO. تتضمن دورة CUDA Academy 4 دروس في المجموع.
ماذا ستتعلم في «مقاييس النواة في Nsight Compute»؟
بيانات معدل النقل والتوقفات ومخطط السقف. تتمرن على CUDA Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ CUDA Academy؟
لا تُشترط خبرة سابقة. CUDA Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 2 من أصل 4.
كم من الوقت يستغرق درس «مقاييس النواة في Nsight Compute»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس CUDA Academy هذا؟
نعم. كل درس في CUDA Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- العرض الزمني في Nsight Systems
- مقاييس النواة في Nsight Compute
- مقيّد بالحساب مقابل مقيّد بالذاكرة
- إضافة تعليقات إلى الكود باستخدام NVTX