Terminal UI for NVIDIA Nsight Systems profiles โ timeline viewer, kernel navigator, NVTX hierarchy
Project description
๐ฌ nsys-ai
Terminal UI for NVIDIA Nsight Systems profiles
Navigate GPU kernel timelines, explore NVTX hierarchies, and analyze performance โ all from your terminal.
โก Install
pip install nsys-ai
That's it. No system dependencies, no CUDA required. Just Python 3.10+.
๐ฏ What It Does
nsys-ai reads .sqlite profile exports from NVIDIA Nsight Systems and gives you three ways to explore them:
๐ฅ๏ธ Timeline TUIPerfetto-style horizontal timeline in your terminal |
๐ฒ Tree TUIInteractive NVTX hierarchy browser with kernel details |
๐ HTML ViewerExportable interactive visualizations for sharing |
|
|
Interactive HTML exports: |
๐ Quick Start
1. Get a profile
# Profile your PyTorch training
nsys profile -o my_training python train.py
# โ produces my_training.sqlite
2. Explore it
# Quick overview
nsys-ai info my_training.sqlite
# Interactive timeline (the main attraction)
nsys-ai timeline my_training.sqlite --gpu 0 --trim 39 42
# Interactive tree browser
nsys-ai tui my_training.sqlite --gpu 0 --trim 39 42
# GPU kernel summary
nsys-ai summary my_training.sqlite --gpu 0
3. Export & share
# Perfetto JSON (open in ui.perfetto.dev)
nsys-ai export my_training.sqlite -o traces/
# Interactive HTML viewer
nsys-ai viewer my_training.sqlite --gpu 0 --trim 39 42 -o report.html
# Flat CSV/JSON for scripting
nsys-ai export-csv my_training.sqlite --gpu 0 --trim 39 42 -o kernels.csv
โจ๏ธ Timeline TUI
The timeline is a Perfetto-style horizontal viewer with per-stream kernel visualization, NVTX hierarchy bars, and a time-cursor navigation model.
Navigation
| Key | Action |
|---|---|
โ โ |
Pan through time |
Shift+โ/โ |
Page pan (1/4 viewport) |
โ โ |
Select stream |
Tab |
Snap to next kernel |
+ - |
Zoom in / out |
a |
Toggle absolute โ relative time |
Analysis
| Key | Action |
|---|---|
/ |
Filter kernels by name |
m |
Set minimum duration threshold |
d |
Toggle demangled kernel names |
C |
Open config panel |
h |
Full help overlay |
Bookmarks
| Key | Action |
|---|---|
B |
Save bookmark (with kernel + NVTX context) |
' |
Bookmark list โ press 1-9 to jump |
, . |
Cycle through bookmarks |
` |
Jump back to previous position |
[ ] |
Set range start / end |
Config Panel (C)
Tweak settings live with โ/โ to select and โ/โ to adjust:
- Selected stream rows (1-6)
- Other stream rows (1-4)
- Time tick density (2-20)
- NVTX depth levels (0-8)
- Min kernel duration filter
๐ Documentation
The docs/ directory includes comprehensive guides for Nsight Systems profiling:
| Guide | Topic |
|---|---|
| CLI Reference | Full nsys command reference |
| SQLite Schema | Database tables & relationships |
| NVTX Annotations | Adding markers to your code |
| CUDA Trace | GPU kernel tracing |
| NCCL Tracing | Multi-GPU collective analysis |
| Python/PyTorch | Profiling PyTorch workloads |
| Containers | Profiling inside Docker/Slurm |
| Focused Profiling | Targeted profiling strategies |
๐ Interactive SQLite Schema Explorer
The docs/sqlite-explorer/ contains an interactive HTML tool for exploring the Nsight SQLite schema โ tables, foreign keys, example queries, and key concepts. Open docs/sqlite-explorer/index.html in a browser:
- Browse all Nsight SQLite tables with column types
- See foreign key relationships visualized
- Copy-paste ready SQL query examples
- Cross-highlighted concept explanations
๐ ๏ธ All Commands
| Command | Description |
|---|---|
info |
Profile metadata & GPU hardware |
summary |
Top kernels, stream breakdown, auto-commentary |
overlap |
Compute / NCCL overlap analysis |
nccl |
NCCL collective breakdown by type |
iters |
Auto-detect training iterations |
tree |
NVTX hierarchy as text |
tui |
Interactive tree TUI |
timeline |
Interactive timeline TUI |
search |
Search kernels / NVTX by name |
export |
Perfetto JSON traces |
export-csv |
Flat CSV for spreadsheets |
export-json |
Flat JSON for scripting |
viewer |
Interactive HTML report |
markdown |
NVTX hierarchy as markdown |
๐ค AI Analysis (Optional)
nsys-ai includes an optional AI module that can analyze your profiles:
pip install nsys-ai[ai]
- Auto-commentary on kernel distributions and performance patterns
- NVTX annotation suggestions for un-annotated code regions
- Performance bottleneck detection with actionable recommendations
๐งโ๐ป Development
git clone https://github.com/GindaChen/nsys-ai.git
cd nsys-ai
pip install -e '.[dev]'
pytest tests/ -v
๐ License
MIT โ see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nsys_ai-0.2.1.tar.gz.
File metadata
- Download URL: nsys_ai-0.2.1.tar.gz
- Upload date:
- Size: 68.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9bf39cd5bb41c4216428765f618dedd1ee0ba57c0fe8566ff4fd11da104e867
|
|
| MD5 |
0a0837d7963894644706d30758e15faa
|
|
| BLAKE2b-256 |
a1bf19ee90349898c46773e3e1e05a1f73b92c94e54b75b7324ca50555adc1ca
|
File details
Details for the file nsys_ai-0.2.1-py3-none-any.whl.
File metadata
- Download URL: nsys_ai-0.2.1-py3-none-any.whl
- Upload date:
- Size: 75.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3bda9d446c189a0a27430560ba4f6293f60ad4d2a83637877849334cb23f4df
|
|
| MD5 |
9366cd67b9d1d5753d4596fb7da3d5d6
|
|
| BLAKE2b-256 |
61edef7e093b03fba7b141a51197cc738de8db068b476bd3cf99ed6cb11511aa
|