Skip to content

Conversation

@simonguozirui
Copy link
Collaborator

@simonguozirui simonguozirui commented Dec 16, 2025

Integrate Nsight Python profiling
This PR wires up NVIDIA’s nsight-python to:

  1. Profile kernels for specific GPU metrics (e.g. sm__cycles_active.avg) via a profile_with_nsight helper.
  2. Expose profiling via a clean API that takes in kernelbench function output
  3. Expose Nsight-based timing as an additional timing method (alongside CUDA events/host time) so it can be selected from the standard timing comparison.

Nsight Python is a recent Pythonic wrapper on NCU released by NVIDIA, which makes it a lot easier to profile metrics of interest. We tested this with their 0.95 release.

Note to leverage NCU or hardware counter you might need hardware counter access (often come with sudo access); this is currently not possible with modal execution or some cloud provider's GPU; you must use a local GPU.

This is also an experimental feature serve as additional toolkit, not integrated in the core eval loop right now.

Also fix package wheel issue of some package data in this PR as mentioned in #117

@simonguozirui simonguozirui changed the title [WIP] Python NCU Metric Profiling Enabling NCU Metric Profiling via Pythonic API Jan 7, 2026
@simonguozirui
Copy link
Collaborator Author

simonguozirui commented Jan 8, 2026

Great job @kesavanramakrishnan and thank you @jason-yoo-108 for your helpful discussion and feedback!

We can improve it in future PR to make it easier to integrate or avoid rerunning program triggered by nsight-python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants