ForkNovita AINovita AIpublished Nov 17, 2026seen 1w

novitalabs/nsight-perf-sdk-for-ai

forked from NVIDIA/nsight-perf-sdk-for-ai

Open original ↗

Captured source

source ↗

novitalabs/nsight-perf-sdk-for-ai

Description: Always-on, low-overhead GPU and CUDA performance tracing SDK for AI workloads. C++ client APIs, CLI tools, open data model, Perfetto export.

License: Apache-2.0

Stars: 0

Forks: 0

Open issues: 0

Created: 2026-11-17T09:08:27Z

Pushed: 2026-11-04T21:32:46Z

Default branch: main

Fork: yes

Parent repository: NVIDIA/nsight-perf-sdk-for-ai

Archived: no

README:

NVIDIA Nsight Perf SDK for AI

Version: Beta Preview

The NVIDIA Nsight Perf SDK provides APIs and tools for continuously collecting and consuming performance data from NVIDIA GPUs and the CUDA API. It supports always-on profiling so applications can identify performance issues during execution or by post-processing captured data.

Features

Continuous, low-overhead profiling

NVIDIA Nsight Perf runs continuously in the background. Representative measurements observed .

Open the generated `.perfetto-trace.zip` file in . If a trace is too large to open directly, compress an uncompressed trace with `gzip -9`; Perfetto can open `.gz` files.

For complete command-line details, see the [tool documentation](https://github.com/NVIDIA/nvtrace-tools/blob/main/README.md). For the sample build and smoke test, see the [CUDA samples](https://github.com/NVIDIA/nvtrace-samples-cuda/blob/main/README.md).

## Compatibility

NVIDIA Nsight Perf makes these compatibility guarantees:

- **CUDA forward compatibility:** NVIDIA Nsight Perf release remains compatible with later CUDA Toolkit, runtime, and driver releases. Features introduced by a later CUDA release may require a newer NVIDIA Nsight Perf release and might not be collected or displayed by an older release.
- **Service-consumer compatibility:** service-connected NvTrace consumers and the NVIDIA Nsight Perf service are compatible across SDK releases in both directions. A newer consumer can connect to an older service, and an older consumer can connect to a newer service. Cross-version use provides the features understood by the participating versions; it does not make newer features available to an older component.

## Software Architecture

NVIDIA Nsight Perf has two primary layers:

1. The **service** runs in a separate process, collects data from GPU and target-side providers, and publishes provider buffers to authorized clients. One service can observe multiple processes and GPUs.
2. The **client** connects to the service, reads provider buffers through observers, writes Trace Streaming Format (`.nvtsf`) data blocks, builds an offline data model, and exports that model to formats such as Perfetto.

The profiled workload runs independently from the consumer. Start the service and consumer before the workload enters the region of interest so the observation window contains all relevant activity.

## Known issues and limitations

- Each GPU can be initialized by only one NVIDIA Nsight Perf service instance at a time because GPU PM-counter and hardware-event sessions are exclusive.
- The `nvidia-nsight-perf` executable should load a CUDA user-mode driver that matches the host kernel-mode driver. Otherwise, GPU GR-context tracing may fail, resulting in incomplete GPU-event correlation or missing GPU timings for named CUDA kernels. See [GPU GR-context tracing and CUDA forward compatibility](https://github.com/NVIDIA/nsight-perf-daemon/blob/main/README.md#gpu-gr-context-tracing-and-cuda-forward-compatibility) for driver requirements and deployment checks.
- Kernels that start before the observation window may not appear.
- NVTX start-end ranges are not supported.
- On the 620 driver, mixing the NVTX core push-pop APIs (nvtxRangePush*/nvtxRangePop) and the Payload Extension push-pop APIs (nvtxRangePushPayload/nvtxRangePopPayload) on the same range may cause the push-pop ranges on that thread to be traced incorrectly. Use the [NVTX CUDA driver injection proxy](https://github.com/NVIDIA/nvtrace-tools/blob/main/NvtxCudaDriverInjectionProxy/README.md) to trace such ranges correctly. Driver versions later than 620 do not require this.
- On the 620 driver, using NVTX in a parent before `fork()` and in its child afterward can cause incorrect traces, hangs or crashes. Using NVTX on only one side of the fork, or in a child that calls `exec()` before using NVTX, is supported.
- For PyTorch `DataLoader` workers, use `multiprocessing_context="spawn"` or `multiprocessing_context="forkserver"` instead of `"fork"`.
- The maximum recommended GPU PM-counter sampling rate is 20 kHz.
- For batched asynchronous memcpy (cuMemcpyBatchAsync_v2), NVIDIA Nsight Perf may display multiple copies in a CUDA submission group as one GPU memcpy event. The event's duration covers the group, but its transfer details may describe only the first copy. Do not use these events to determine per-copy counts, sizes, addresses, bandwidth, or the duration of the entire batch.

## Contributions

Contributions require signed-off commits and the Developer Certificate of Origin. See [CONTRIBUTING.md](CONTRIBUTING.md) before submitting a change.

## Security

Do not report potential security vulnerabilities through public GitHub issues. Follow the private reporting process in [SECURITY.md](SECURITY.md).

## License

NVIDIA-authored aggregate source and build material are licensed under Apache-2.0; see [LICENSE](LICENSE). Components, imported CUDA Samples, NVTX, and proprietary binaries retain their own terms. See [LICENSING.md](LICENSING.md) and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for component paths, source repositories, and notices.

### External materials

NOTICE AND DISCLAIMER: This software automatically retrieves, accesses or interacts with external materials. Those retrieved materials are not distributed with this software and are governed solely by separate terms, conditions and licenses. You are solely responsible for finding, reviewing and complying with all applicable terms, conditions, and licenses, and for verifying the security, integrity and suitability of any retrieved materials for your specific use case. This software is provided "AS IS", without warranty of any kind. The author makes no representations or warranties regarding any retrieved materials, and assumes no liability for any losses, damages, liabilities or legal consequences from your use or inability to use this software or any retrieved materials. Use this software and the retrieved materials at your own risk.

### Component source and license files

| Component path | Source...

Excerpt shown — open the source for the full document.