Repository navigation
Conversation
Calling a function decorated with nsight.analyze.kernel as f(n=4096) dropped the keyword argument. The call was profiled with the default value of n, or with the decorator-time configs, and the results reported that other configuration. f(42, y=23) already raised "Keyword arguments are not supported yet". Raise the same error whenever keyword arguments are passed, and say so in the kernel docstring. Signed-off-by: Dezhen Lu <dezhen.lu@student.uni-tuebingen.de>
Collaborator
|
/ok to test 50fddbf |
@nvssatoor, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
Collaborator
|
/ok to test 50fddbf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #88
A function decorated with
@nsight.analyze.kerneland called asbench(n=4096)dropped the keyword argument. The call was profiled with the default value ofn, or with the decorator-timeconfigs, and the results reported that configuration.bench(42, y=23)already raisedProfilerException: Keyword arguments are not supported yet. The check was insideif len(args) > 0:in_sanitize_configs, so it did not run when there were no positional arguments.Change
nsight/collection/core.py: run the keyword-argument check for every call, with the same exception and message as before. The_sanitize_configsdocstring no longer says that args and kwargs are combined.nsight/analyze.py: thekerneldocstring now says that**kwargsare not supported and raiseProfilerException.tests/test_profiler.py:test_config_at_call_time_with_only_kwargs, next to the existingtest_config_at_call_time_with_kwargs.Testing
Run on x86_64 Linux without a GPU (
CUDA_VISIBLE_DEVICESempty), Python 3.12.3, onmainatfcb47f2:pytest tests/test_profiler.py -k config_at_call_time_with:mainwith only the new test added, 1 failed (the call is not rejected and reaches profiling), 1 passed; with this change, 2 passed. The new test raises before profiling starts, so it needs no GPU.pytest tests/test_collection.py tests/test_transformation.py tests/test_info_collector.py: 54 passed, onmainand with this change.black --check .,isort --check .,mypy --strict --ignore-missing-imports .(lint environment with the project, black, isort and mypy): clean.Not run: the GPU tests and the examples (NCU and CUPTI), and the docs build. The Nsight Compute on the machine used was older than the version the tests require.
No release-note entry is included; I can add one to this PR if you want it.
This change was drafted with Claude Code (claude-fable-5-2, rebase and PR text with claude-opus-5-5); the test results above are from the runs described.