cuda-profiling
CUDA profiling skill for NVIDIA GPU performance analysis.
Skill by OzcanOrhanDemirci
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ozcanorhandemirci-cuda-profiling
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/cuda-profiling
What's inside
- Skill name
cuda-profiling- Description
- CUDA profiling skill for NVIDIA GPU performance analysis. Use when profiling kernels with Nsight Systems or Nsight Compute, interpreting roofline models, diagnosing memory-bound vs compute-bound kernels, or annotating code with NVTX ranges. Activates on queries about Nsight, NCU, ncu CLI, GPU roofline, occupancy metrics, or CUDA profiling workflow.
- License
- Apache-2.0
- Instructions
- 187 lines in SKILL.md · view on GitHub
Files (2)
- LICENSE.source
- SKILL.md
SKILL.md (first lines)
# CUDA Profiling
## Purpose
Guide agents through profiling CUDA applications with Nsight Systems (timeline-level) and Nsight Compute (kernel-level metrics), using the NCU CLI for automated metric collection, interpreting roofline models, and diagnosing whether kernels are memory-bound or compute-bound.
## When to Use
- A CUDA kernel is slower than expected and you need bottleneck identification
- Comparing kernel variants (tiling strategies, block sizes)
- Building CI performance regression checks with `ncu` metrics
- Correlating CPU and GPU activity in multi-stream pipelines
- Annotating application phases with NVTX for timeline visibility
- Interpreting occupancy, memory throughput, and SM utilization metrics
## Workflow
### 1. Choose profiling tool
```
What do you need?
├── System-wide timeline (CPU+GPU+CUDA API) → Nsight Systems (nsys)
├── Per-kernel deep metrics (occupancy, memory) → Nsight Compute (ncu)
└── Quick metric from CLI in CI → ncu --metrics ...
```
### 2. Nsight Systems — timeline profiling
```bash
# Profile entire application
nsys profile --trace=cuda,nvtx,osrt --output=report ./my_cuda_app
# Open report
nsys-ui report.nsys-rep
# CLI summary
nsys stats report.nsys-rep
```
What to look for in the timeline:
- Gaps between kernel launches (CPU bottleneck or sync points)
- `cudaDeviceSynchronize` stalls
- Overlap between H2D copies and kernel execution across streams
- CUDA API call overhead
```bash
# Capture with CUDA graph info
nsys profile --capture-range=cudaProfilerApi ./my_cuda_app
```
### 3. NVTX range annotations
```cpp
#include <nvtx3/nvToolsExt.h>
void pipeline(void) {
nvtxRangePushA("H2D copy");
cudaMemcpyAsync(d_in, h_in, size, cudaMemcpyHostToDevice, stream);
nvtxRangePop();
nvtxRangePushA("kernel");
my_kernel<<<grid, block, 0, stream>>>(d_in, d_out, n);
nvtxRangePop();
nvtxRangePushA("D2H copy");
cudaMemcpyAsync(h_out, d_out, size, cudaMemcpyDeviceToHost, stream);
nvtxRangePop();
}
```
Compile with `-lnvToolsExt` or link nvtx3 header-only. Ranges appear as colored bands in Nsight Systems.
### 4. Nsight Compute — kernel analysis
```bash
# Profile all kernels, save report
ncu -o kernel_report ./my_cuda_app
# Profile specific kernel by name
ncu --kernel-name regex:matmul_tiled ./my_cuda_app
# Launch UI
ncu-ui kernel_report.ncu-rep
```
Key sections in NCU report:
- **Speed of Light**: SM throughput vs memory throughput vs peak
- **Occupancy**: Active warps vs hardware limit
- **Memory Workload Analysis**: L1/L2 hit rates, coalescing efficiency
- **Warp State Statistics**: Stall reasons (memory, barrier, dispatch)
### 5. NCU CLI metrics
```bash
# Essential metrics set
ncu --metrics \
sm__throughput.avg.pct_of_peak_sustained_elapsed,\
dram__throughput.avg.pct_of_peak_sustained_elapsed,\
sm__warps_active.avg.pct_of_peak_sustained_active,\
l1tex__t_sectors_pipe_lsu_mem_global_op_ld.sum,\
smsp__sass_thread_inst_executed_op_ffma_pred_on.sum \
./my_cuda_app
# CSV export for CI
ncu --csv --metrics dram__bytes_read.sum,dram__bytes_write.sum ./my_cuda_app
# Set kernel replay mode for accurate counters
ncu --kernel-replay-mode application ./my_cuda_app
```
### 6. Memory-bound vs compute-bound diagnosis
```
Roofline interpretation
├── dram__throughput near peak AND sm__throughput low → memory-bound
│ └── Fix: coalescing, shared mem tiling, reduce traffic
├── sm__throughput near peak AND dram low → compute-bound
│ └── Fix: tensor cores, loop unrolling, ILP
└── Both low → launch config, occupancy, or sync overheadFrom OzcanOrhanDemirci/Mode_Code, Apache-2.0.
More from OzcanOrhanDemirci/Mode_Code
- 0.570score
i2c-bringup-diagnostician
OzcanOrhanDemirci
Use when users need to diagnose I2C bring-up failures on Arduino or ESP32-class boards, including no devices found, wrong readings, address conflicts…
SkillAFreshness: AClaude Code +9 - 0.565score
appstore-review
OzcanOrhanDemirci
Checks an iOS/iPadOS/macOS app project against Apple's App Store Review Guidelines before submission.
SkillAFreshness: AClaude Code +9 - 0.565score
dart-3-updates
OzcanOrhanDemirci
Use when writing switch statements, refactoring if-else chains, creating data classes, choosing records vs classes, destructuring values, or modernizing…
SkillAFreshness: AClaude Code +9 - 0.565score
firebase-cloud-firestore
OzcanOrhanDemirci
Use when setting up Firestore, designing schemas, doing CRUD, creating listeners, paginating queries, configuring indexes, enabling offline persistence, or…
SkillAFreshness: AClaude Code +9 - 0.565score
playstore-review
OzcanOrhanDemirci
Checks an Android app project against Google Play's Developer Program Policies before submission.
SkillAFreshness: AClaude Code +9 - 0.561score
openscad
OzcanOrhanDemirci
Create and render OpenSCAD 3D models.
SkillAFreshness: AClaude Code +9 - 0.558score
firebase-security-rules-auditor
Google LLC
Audits Firebase (Firestore, Cloud Storage) security rules for vulnerabilities, privilege escalation, role bypasses, create vs update inconsistencies, resource…
SkillAFreshness: AClaude Code +9 - 0.549score
firestore-rules-creation
Google LLC
Designs, authors, refactors, and hardens production-grade Cloud Firestore Security Rules (firestore.rules).
SkillAFreshness: AClaude Code +9 - 0.539score
codebase-design
OzcanOrhanDemirci
Shared vocabulary for designing deep modules.
SkillAFreshness: AClaude Code +9 - 0.539score
domain-modeling
OzcanOrhanDemirci
Build and sharpen a project's domain model.
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 5
- Last commit (this folder)
- Oct 18, 2026 (10 days ago)
- Last release
- Oct 15, 2026 (13 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/OzcanOrhanDemirci/Mode_Code
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from OzcanOrhanDemirci
- 0.570score
i2c-bringup-diagnostician
OzcanOrhanDemirci
Use when users need to diagnose I2C bring-up failures on Arduino or ESP32-class boards, including no devices found, wrong readings, address conflicts…
SkillAFreshness: AClaude Code +9 - 0.565score
playstore-review
OzcanOrhanDemirci
Checks an Android app project against Google Play's Developer Program Policies before submission.
SkillAFreshness: AClaude Code +9 - 0.565score
dart-3-updates
OzcanOrhanDemirci
Use when writing switch statements, refactoring if-else chains, creating data classes, choosing records vs classes, destructuring values, or modernizing…
SkillAFreshness: AClaude Code +9 - 0.565score
firebase-cloud-firestore
OzcanOrhanDemirci
Use when setting up Firestore, designing schemas, doing CRUD, creating listeners, paginating queries, configuring indexes, enabling offline persistence, or…
SkillAFreshness: AClaude Code +9 - 0.565score
appstore-review
OzcanOrhanDemirci
Checks an iOS/iPadOS/macOS app project against Apple's App Store Review Guidelines before submission.
SkillAFreshness: AClaude Code +9 - 0.561score
openscad
OzcanOrhanDemirci
Create and render OpenSCAD 3D models.
SkillAFreshness: AClaude Code +9
Cite this page
cuda-profiling skill. Agent Mart. https://agentmart.dev/skills/ozcanorhandemirci-cuda-profiling (last updated 2026-10-24)