perf-cuda-graphs

Capture CUDA graphs to reduce host overhead during GPU model training.

852|445|Updated May 21, 2025
One-click install
npx skills add https://github.com/NVIDIA-NeMo/Megatron-Bridge --skill perf-cuda-graphs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perf-cuda-graphs
Source: https://github.com/NVIDIA-NeMo/Megatron-Bridge/tree/main/skills/perf-cuda-graphs
Command: npx skills add https://github.com/NVIDIA-NeMo/Megatron-Bridge --skill perf-cuda-graphs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables efficient GPU computation by capturing CUDA graphs to reduce host-driver overhead, significantly speeding up training iterations.

Core Features & Use Cases

  • CUDA Graph Capture: Supports local full-iteration and TE-scoped graphs for attention, MLP, and MoE modules.
  • Performance Optimization: Applicable for training large models with static shapes, improving throughput and reducing iteration time.
  • Use Case: Use this Skill to accelerate training of large-scale language models on GPU clusters by minimizing kernel launch overhead.

Quick Start

Use the cuda-graphs skill to enable CUDA graph capture during training by setting the implementation to 'transformer_engine' and configuring the scope for attention and MoE modules.

Frequently Asked Questions about perf-cuda-graphs

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

FAQPage Schema
How do I reduce kernel launch overhead during GPU training?

To reduce kernel launch overhead during GPU training, you can use CUDA graph capture to record and replay static execution flows, minimizing host-driver overhead and significantly speeding up training iterations.

What is CUDA graph capture and how does it optimize deep learning workloads?

CUDA graph capture is a technique that records a sequence of GPU operations into a reusable graph. It optimizes deep learning workloads by eliminating per-kernel launch overhead, resulting in increased throughput and reduced iteration time for static-shape models.

How do I enable CUDA graphs for attention and MoE modules in my model?

To enable CUDA graphs for attention and MoE modules, set the implementation to 'transformer_engine' and configure the capture scope to target these specific modules during your training loop setup.

Can I use CUDA graph capture for models with dynamic shapes?

CUDA graph capture is not suitable for models with dynamic shapes. It is designed specifically for static-shape, large-scale deep learning tasks where execution flows remain constant, ensuring valid performance tuning and reduced iteration time.

Does CUDA graph capture work with Transformer Engine for large-scale model training?

Yes, CUDA graph capture works with Transformer Engine, supporting TE-scoped graphs for attention, MLP, and MoE modules to accelerate the training of large-scale language models on GPU clusters by minimizing host overhead.