Skip to content

[misc] feat: Add NVTX ranges for train_step and optimizer_step - #3198

Merged
cuichenx merged 1 commit into
NVIDIA-NeMo:mainfrom
minitu:jaeminc/nvtx-train-step-optimizer-ranges
Jun 11, 2026
Merged

cuichenx merged 1 commit into
NVIDIA-NeMo:mainfrom
minitu:jaeminc/nvtx-train-step-optimizer-ranges

Conversation

@minitu

@minitu minitu commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

What does this PR do ?

Add @nvtx_decorator() on train_step to emit an NVTX range named megatron.bridge.training.train.train_step, and add explicit nvtx_range_push/pop around the optimizer step block within train_step.

These ranges are gated by the nvtx_ranges profiling config and require the nvtx_decorator call-time fix in Megatron-LM (NVIDIA/Megatron-LM#4184).

Changelog

  • Add specific line by line info of high level changes in this PR.

GitHub Actions CI

See the CI sectionin the Contributing doc for how to trigger the CI. A Nvidia developer will need to approve and trigger the CI for external contributors.

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

If you haven't finished some of the above items you can still open "Draft" PR.

Additional Information

  • Related to # (issue)

@copy-pr-bot

copy-pr-bot Bot commented Apr 7, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@minitu minitu changed the title Add NVTX ranges for train_step and optimizer_step [training] feat: Add NVTX ranges for train_step and optimizer_step Apr 7, 2026
@minitu minitu added feature New capabilities, enhancements, or enablement work area:misc Cross-cutting utilities, logging, helpers, and other changes labels Apr 7, 2026
@minitu minitu changed the title [training] feat: Add NVTX ranges for train_step and optimizer_step [misc] feat: Add NVTX ranges for train_step and optimizer_step Apr 7, 2026
@minitu
minitu marked this pull request as ready for review June 9, 2026 21:36
@minitu minitu self-assigned this Jun 9, 2026
@minitu minitu added the needs-review PR is ready for code review and waiting on a reviewer label Jun 9, 2026
@minitu
minitu force-pushed the jaeminc/nvtx-train-step-optimizer-ranges branch from 75b7e6b to c06e867 Compare June 9, 2026 21:44
Signed-off-by: Jaemin Choi <jaeminc@nvidia.com>
@minitu
minitu force-pushed the jaeminc/nvtx-train-step-optimizer-ranges branch from c06e867 to ae564c9 Compare June 9, 2026 21:48
@gautham-kollu

Copy link
Copy Markdown
Contributor

/ok to test ae564c9

@gautham-kollu

Copy link
Copy Markdown
Contributor

/ok to test ae564c9

@cuichenx

Copy link
Copy Markdown
Contributor

@cuichenx
cuichenx disabled auto-merge June 11, 2026 15:59
@cuichenx
cuichenx merged commit 8906e2e into NVIDIA-NeMo:main Jun 11, 2026
170 of 176 checks passed

This branch was previously deployed

2 inactive deployments
public — ae564c90 Deployed Jun 10, 2026 by copy-pr-bot[bot] via release / finalize / notify #1333
test — ae564c90 Deployed Jun 10, 2026 by copy-pr-bot[bot] via cicd-wait-in-queue #16094
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:misc Cross-cutting utilities, logging, helpers, and other changes feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants