nsys-optimizer

Profile CUDA/GPU simulations with Nsight Systems and analyze bottlenecks statistically.

7|1|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/hkqai/MatClaw --skill nsys-optimizer-hkqai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nsys-optimizer
Source: https://github.com/hkqai/MatClaw/tree/main/skills/nsys-optimizer
Command: npx skills add https://github.com/hkqai/MatClaw --skill nsys-optimizer-hkqai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires scipy, and includes scripts (resource) components.

What problem does it solve?

Slow or inefficient CUDA/GPU simulation code hampers research productivity and leads to excessive compute costs. This skill provides a systematic workflow to profile, diagnose, and optimize such code using NVIDIA Nsight Systems.

Core Features & Use Cases

  • Automated Profiling: Runs nsys to capture detailed kernel and API statistics for any simulation script.
  • Bottleneck Diagnosis: Parses profiling data to highlight synchronization points, low‑parallelism kernels, and memory‑bound workloads.
  • Statistical A/B Comparison: Executes repeated profiles, aggregates results, and applies Welch’s t‑test to evaluate optimization impact.
  • Verification & Iteration: Guides users through NVTX annotation, correctness testing, and iterative re‑profiling until performance goals are met.
  • Use Case Example: When a new CUDA kernel slows down a material‑simulation scene, invoke this skill to locate the hot path, apply parallelization patterns, and validate speed‑up.

Quick Start

Ask the nsys-optimizer skill to profile and improve your CUDA simulation by providing the path to the scene script.

Frequently Asked Questions about nsys-optimizer

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

FAQPage Schema
How do I profile and optimize slow CUDA simulation code using nsys?

To optimize slow CUDA simulation code, this skill orchestrates Nsight Systems profiling to capture kernel statistics, diagnose bottlenecks, and apply statistical A/B testing for iterative speed-up verification.

Why does my GPU kernel experience performance bottlenecks during material simulation?

GPU kernel bottlenecks are diagnosed by parsing nsys profiling data to highlight low-parallelism kernels, synchronization points, and memory-bound workloads causing the performance degradation.

Can I use statistical A/B comparison to validate CUDA optimization impact?

Yes, you can validate CUDA optimization impact by executing repeated nsys profiles, aggregating the data, and applying Welch's t-test to statistically evaluate the performance differences between configurations.

What's the best way to add NVTX annotations to trace hot paths in CUDA scripts?

The best way to trace hot paths in CUDA scripts is by adding NVTX annotations, which the skill uses to guide correctness testing and iterative re-profiling until performance goals are met.

Do I need scipy installed to run statistical analysis on nsys profiling data?

Yes, scipy is required as a dependency to perform the statistical A/B analysis and apply Welch's t-test when evaluating the impact of your CUDA kernel optimizations.

nsys-optimizer: what specific inefficiencies does it identify in GPU simulation workloads?

The nsys-optimizer identifies synchronization points, low-parallelism kernels, and memory-bound workloads within GPU simulation workloads to systematically locate and resolve hot paths.