Skip to content

Commit 7b07ede

Browse files
Alok-Joshiclaude
andcommitted
Document that annotations must launch the same number of kernels
Add a known issue and note it in the combine_kernel_metrics docstring. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Alok Joshi <aljoshi@nvidia.com>
1 parent 4f13f2e commit 7b07ede

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎docs/source/release_notes/known_issues.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ Known Issues
99
- Nested annotations (using ``nsight.annotate`` within another ``nsight.annotate`` context) are not supported. nsight-python errors out when nested annotations are used.
1010
- ``*args`` and ``**kwargs`` in decorated function signatures are tolerated but ignored — they will always be empty and will not appear in the profiling output.
1111
- Calling :func:`@nsight.analyze.kernel <nsight.analyze.kernel>`-decorated functions from multiple threads is not supported, whether the threads run sequentially or concurrently.
12+
- Each annotation must launch the same number of kernels across configurations and repeated runs, even with ``combine_kernel_metrics``. Different counts may cause an error or incorrect results. Profile configurations separately when their kernel counts differ.

‎nsight/analyze.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@ def wrapped_function(*args, configs=None, **kwargs) -> ProfileResults
201201
how to summarize the collected metrics into a single number. For example,
202202
if we profile runtime and want to sum the times of all kernels we can specify
203203
``combine_kernel_metrics = lambda x, y: x + y``. The function should take
204-
two arguments and return a single value. Default: ``None``.
204+
two arguments and return a single value. Each annotation must still launch
205+
the same number of kernels across configurations and repeated runs;
206+
different counts may cause an error or incorrect results. Default: ``None``.
205207
clock_control: Control the behavior of the GPU clocks during profiling. Allowed values:
206208
207209
- ``"base"``: GPC and memory clocks are locked to their respective base frequency during profiling. This has no impact on thermal throttling. Note that actual clocks might still vary, depending on the level of driver support for this feature. As an alternative, use nvidia-smi to lock the clocks externally and set this option to ``"none"``.

0 commit comments

Comments
 (0)