|
| 1 | +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 2 | +.. SPDX-License-Identifier: Apache-2.0 |
| 3 | +
|
| 4 | +Updates in Nsight Python 1.0.0 |
| 5 | +============================== |
| 6 | + |
| 7 | +Enhancements |
| 8 | +------------ |
| 9 | + |
| 10 | +- **Eliminated per-decorator Python script relaunch**: Previously, nsight-python |
| 11 | + relaunched the entire Python script once for each :func:`@nsight.analyze.kernel <nsight.analyze.kernel>` decorated |
| 12 | + function in order to collect profiles using NVIDIA Nsight Compute. nsight-python now |
| 13 | + dynamically loads NVIDIA Nsight Compute's CUDA injection library at import time and uses |
| 14 | + ``ncu --mode attach`` to attach to the running Python process, with no script relaunch. |
| 15 | + This reduces profiling overhead and avoids relaunch-related side effects from |
| 16 | + re-running module/import-time code. |
| 17 | + Interactive environments such as Jupyter Notebook and Google Colab are now supported |
| 18 | + (fixes `#3 <https://github.com/NVIDIA/nsight-python/issues/3>`_ and `#19 <https://github.com/NVIDIA/nsight-python/issues/19>`_). |
| 19 | + |
| 20 | +- **Added support for metric units**: The DataFrame returned by |
| 21 | + :meth:`~nsight.collection.core.ProfileResults.to_dataframe` now includes a ``Unit`` column. Units for |
| 22 | + metrics collected with NVIDIA Nsight Compute are parsed directly from the report. For derived |
| 23 | + metrics, ``derive_metric`` should return a ``(value, unit)`` tuple for a single |
| 24 | + metric, or a dictionary of ``(value, unit)`` tuples for multiple metrics. Returning |
| 25 | + only the value remains supported for backward compatibility, but emits a warning and |
| 26 | + sets ``Unit`` to ``np.nan``. |
| 27 | + |
| 28 | +- **Improved decorated function parameter handling** |
| 29 | + (`#31 <https://github.com/NVIDIA/nsight-python/pull/31>`_): |
| 30 | + |
| 31 | + - **Keyword-only parameters** (defined after ``*`` in the signature) are now |
| 32 | + supported. Config values are mapped correctly to both positional and keyword-only |
| 33 | + parameters. |
| 34 | + - **Default parameter values**: configs can now omit trailing parameters that have |
| 35 | + defaults — missing values are filled in automatically from the function signature. |
| 36 | + - ``*args`` / ``**kwargs`` no longer cause false validation errors; they are |
| 37 | + excluded from parameter counting and ignored during profiling. |
| 38 | + |
| 39 | +- **Added cuTile kernel example** |
| 40 | + (`#37 <https://github.com/NVIDIA/nsight-python/pull/37>`_): |
| 41 | + Added a new example demonstrating how to profile a CUDA Tile kernel. |
| 42 | + |
| 43 | +API Changes |
| 44 | +----------- |
| 45 | + |
| 46 | +- **Replaced** ``output`` **with** ``verbosity``: The ``output`` parameter of |
| 47 | + :func:`@nsight.analyze.kernel <nsight.analyze.kernel>`, which accepted the strings |
| 48 | + ``"quiet"``, ``"progress"``, and ``"verbose"``, has been replaced by a |
| 49 | + ``verbosity`` parameter of type :class:`~nsight.utils.VerbosityLevel`: |
| 50 | + |
| 51 | + - ``VerbosityLevel.SILENT`` (replaces ``"quiet"``): suppresses all output. |
| 52 | + - ``VerbosityLevel.INFO`` (replaces ``"progress"``): shows the progress bar, |
| 53 | + profiling completion messages, and report file paths. This is the default. |
| 54 | + - ``VerbosityLevel.DEBUG`` (replaces ``"verbose"``): additionally prints the |
| 55 | + full NCU CLI command and enables NCU verbose output. |
| 56 | + |
| 57 | +Fixes |
| 58 | +----- |
| 59 | + |
| 60 | +- **Fixed crashes with tuple-valued function arguments** |
| 61 | + (`#30 <https://github.com/NVIDIA/nsight-python/pull/30>`_): |
| 62 | + Fixed crashes and corrupted extraction results when profiled functions have |
| 63 | + tuple-valued arguments. Tuple arguments are now preserved correctly for |
| 64 | + single- and multi-metric profiling. |
| 65 | + |
| 66 | +- **Fixed crashes with unhashable config parameters** |
| 67 | + (`#42 <https://github.com/NVIDIA/nsight-python/pull/42>`_): |
| 68 | + Fixed crashes when aggregating profiling results for configurations containing |
| 69 | + dictionary- or list-valued arguments. These configuration parameters are now |
| 70 | + handled consistently regardless of the number of runs. |
0 commit comments