Skip to content

feat(profiling): add extra_nsys_args for optional nsys CLI flags#59

Open
zhengd-nv wants to merge 3 commits intoNVIDIA:mainfrom
zhengd-nv:extra-nsys-args
Open

feat(profiling): add extra_nsys_args for optional nsys CLI flags#59
zhengd-nv wants to merge 3 commits intoNVIDIA:mainfrom
zhengd-nv:extra-nsys-args

Conversation

@zhengd-nv
Copy link
Copy Markdown

PR description

Summary

Adds an optional profiling.extra_nsys_args field (list[str] | null) so users can append extra arguments to the nsys profile wrapper for both the default (SGLang) and TRTLLM worker command prefixes, without changing the fixed baseline flags.

Behavior

  • Placement: Extra tokens are inserted immediately before -o <output> so output path and downstream behavior stay predictable.
  • Modes: Applies when profiling type is nsys or nsys-time (same get_nsys_prefix / _get_nsys_prefix_trtllm paths as existing nsys support).
  • TRTLLM: The TRTLLM-specific prefix also honors extra_nsys_args with the same ordering relative to -o.
  • Dynamo frontend: Existing --trace-fork-before-exec=true insertion for frontend_type="dynamo" remains unchanged relative to -o.

Configuration

YAML example:

profiling:
  type: "nsys"
  extra_nsys_args: ["--stats=true", "--trace=osrt"]
  # ... prefill/decode/aggregated as required by mode

Documented in docs/profiling.md and docs/config-reference.md.

Tests

  • tests/test_profiling.py: asserts extra args appear in the prefix and before -o for the default path and for backend_type="trtllm".

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@ef7d598). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #59   +/-   ##
=======================================
  Coverage        ?   70.52%           
=======================================
  Files           ?       60           
  Lines           ?     6325           
  Branches        ?        0           
=======================================
  Hits            ?     4461           
  Misses          ?     1864           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants