Metadata-Version: 2.3
Name: jupyterlab_nvidia_nsight
Version: 0.5.2
Dynamic: Keywords
Summary: A JupyterLab extension for profiling cells execution using NVIDIA Nsight tools.
Project-URL: Homepage, https://pypi.org/project/jupyterlab-nvidia-nsight
Project-URL: Bug Tracker, https://forums.developer.nvidia.com/c/developer-tools/nsight-systems/profiling-linux-targets
Author-email: NVIDIA Corporation <devtools-support@nvidia.com>
License: NVIDIA Proprietary Software
License-File: License.txt
Classifier: Framework :: Jupyter
Classifier: Framework :: Jupyter :: JupyterLab
Classifier: Framework :: Jupyter :: JupyterLab :: 4
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Requires-Dist: docker
Requires-Dist: jupyter-server<3,>=2.0.1
Provides-Extra: test
Requires-Dist: coverage; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-asyncio; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest-jupyter[server]>=0.6.0; extra == 'test'
Description-Content-Type: text/markdown

# NVIDIA Nsight Tools JupyterLab Extension

A JupyterLab extension for profiling cells execution using NVIDIA Nsight tools.

## Demo

Click on the image to launch the video

[![Demo](https://img.youtube.com/vi/YHloC_py1QM/maxresdefault.jpg)](https://www.youtube.com/embed/YHloC_py1QM)

## Requirements

- JupyterLab >= 4.0.0
- Docker (optional, for GUI support)
- [nvtx](https://pypi.org/project/nvtx/) (Required for Nsight Compute support)

Nsight tools are not shipped with this extension. The required tool(s) should be installed separately on the JupyterLab server machine.

## Install and setup

- To install the extension, execute:

```bash
pip install jupyterlab-nvidia-nsight
```

- Set Nsight Systems and/or Nsight Compute installation location in the extension settings.

## Profile JupyterLab cells

1. Enable Nsight tool by using the _Profiling with Nsight Systems/Compute..._ command
   under the _NVIDIA Nsight_ menu, or by using the command palette.
   - **Note**: This operation restarts the JupyterLab kernel.
2. Profile cells execution by using the _Run and profile selected cells..._ command.
3. The cell's profiling info is displayed in the cell output area.

## Analyzing the profile session in Nsight tools GUI

- GUI display is disabled by default. To use Nsight Systems GUI for analysis of report files, check the _Enable Nsight Systems UI_ checkbox in the extension settings.
- Open Nsight tools report files in a tab inside JupyterLab.
- Release 0.5 supports display of Nsight Systems GUI. Display of Nsight Compute GUI is planned for a future release.
- Display of Nsight tools GUI requires a WebRTC docker image.
  Build the [GUI WebRTC docker image](https://docs.nvidia.com/nsight-systems/UserGuide/index.html#gui-webrtc-container) by executing:

```bash
<nsys_install_dir>/host-linux-x64/Scripts/WebRTCContainer/build.sh
```

- Known issue: Keyboard doesn't work in GUI display.

## Supported Tools

### Nsight Systems

- Supports Nsight Systems release 2024.1.1 or later. It is recommended to use the [latest release](https://developer.nvidia.com/nsight-systems).
- Use `--stats=true` when profiling cells execution to see textual output of `nsys stats`.

### Nsight Compute

- Supports textual output.
- GUI analysis of Nsight Compute report files is planned for a future release.
- Supports Nsight Compute release 2022.2 or later. It is recommended to use the [latest release](https://developer.nvidia.com/nsight-compute).

## Uninstall

To remove the extension, execute:

```bash
pip uninstall jupyterlab-nvidia-nsight
```

## Troubleshooting

If you are seeing the frontend extension, but it is not working, check
that the server extension is enabled:

```bash
jupyter server extension list
```

If the server extension is installed and enabled, but you are not seeing
the frontend extension, check the frontend extension is installed:

```bash
jupyter labextension list
```

## Release Notes

### 0.5.2

- Added Nsight Compute section in the project description.
- Verify server connection on extension load.

### 0.5.1

- Initial release.
