Repository navigation
feat: support custom Nsight Systems profiling arguments - #262
Conversation
Signed-off-by: Connor Smith <cosmith@nvidia.com>
wyli
left a comment
There was a problem hiding this comment.
LGTM — no blocking issues. This makes NVTX-only, low-overhead Nsight captures possible through the CLI, and building the profiled command as a list of arguments also fixes --nsys-profile combined with --run-args.
Minor, non-blocking suggestion: consider making --nsys-args turn on --nsys-profile, instead of rejecting it with --nsys-args requires --nsys-profile. --nsys-args does nothing without profiling, and that combination is an error today, so the change only affects commands that currently fail. It would let downstream wrappers such as ./isaac_os offer a single option:
holoscan run my_app --nsys-args='--trace=nvtx --sample=none --backtrace=none --cpuctxsw=none -o profile'It's a one-line change: set args.nsys_profile = True during the existing up-front validation in handle_run, so container.run(nsys_profile=...) and the forwarded run --local command both pick it up. Then update the help text and docs ("implies" instead of "requires"). --nsys-profile alone would keep the --trace=cuda,vulkan,nvtx,osrt default.
Signed-off-by: Connor Smith <cosmith@nvidia.com>
|
Confirmed the URL check failure is fully external, not related to these changes. |
Allow
holoscan run --nsys-argsto customize Nsight Systems profiling options and automatically enable profiling:holoscan run my_app \ --nsys-args='--trace=nvtx --sample=none --backtrace=none --cpuctxsw=none -o profile'Custom options replace the complete profiler option list.
--nsys-profilealone retains--trace=cuda,vulkan,nvtx,osrt; an empty--nsys-args=''uses Nsight’s defaults.Validate quoting before building and forward profiling settings into container execution. Compose profiler and application arguments as separate argument lists, fixing profiling with
--run-args. Let Nsight diagnose collector permissions instead of rejecting all captures whenperf_event_paranoid > 2.Update CLI help and documentation, with regression coverage for local execution, container forwarding, empty arguments, and malformed quoting. Downstream wrappers need updated host and container CLI versions.
Validation:
perf_event_paranoid=4; verified five ranges and five markers through SQLite export../isaac_osusing the earlier revision with explicit--nsys-profile; exported data-flow profiling results were successfully analyzed.Summary by CodeRabbit
holoscan run --nsys-profilecan profile an application after it builds, locally or in a container. CUDA, Vulkan, NVTX, and OS runtime tracing are enabled by default.--nsys-argsreplaces the default profiler options and also enables profiling. Use--run-argsto separate application arguments from profiler options.run-containergrants profiling permissions but does not start profiling or accept--nsys-args.