-
Notifications
You must be signed in to change notification settings - Fork 3k
Perf scripts updates #14005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Perf scripts updates #14005
Conversation
Signed-off-by: Guyue Huang <[email protected]>
Signed-off-by: Guyue Huang <[email protected]>
Signed-off-by: Guyue Huang <[email protected]>
…ther for MXFP8 Signed-off-by: Guyue Huang <[email protected]>
Signed-off-by: Guyue Huang <[email protected]>
Signed-off-by: guyueh1 <[email protected]>
scripts/performance/helpers.py
Outdated
# because it is not supported with reuse_grad_buf_for_mxfp8_param_ag | ||
if compute_dtype.lower() == "fp8" and fp8_recipe.lower() == "mxfp8": | ||
recipe.trainer.strategy.ddp.reuse_grad_buf_for_mxfp8_param_ag = True | ||
recipe.trainer.strategy.ddp.overlap_param_gather = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we can control/override this config...
It will be set if DP > 1
in MegatronCommOverlapCallback
- https://github.com/NVIDIA/NeMo/blob/main/nemo/lightning/pytorch/callbacks/megatron_comm_overlap.py#L188
cc: @JimmyZhang12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated the code to use MegatronCommCallback to set it, I think that will override the inferred config.
Signed-off-by: Guyue Huang <[email protected]>
Signed-off-by: Guyue Huang <[email protected]>
Signed-off-by: Guyue Huang <[email protected]>
…erf_scripts_updates
Signed-off-by: guyueh1 <[email protected]>
Signed-off-by: Guyue Huang <[email protected]>
Signed-off-by: Guyue Huang <[email protected]>
…erf_scripts_updates
Signed-off-by: Guyue Huang <[email protected]>
Signed-off-by: Guyue Huang <[email protected]>
Signed-off-by: Guyue Huang <[email protected]>
scripts/performance/executors.py
Outdated
@@ -66,6 +66,7 @@ def slurm_executor( | |||
"NVTE_FLASH_ATTN": "1", # Enable Flash Attention, which is needed to enable cuDNN fused attention | |||
"NVTE_FUSED_ATTN": "1", # Enable cuDNN fused attention | |||
"NEMO_LOG_MEMORY_USAGE": "1", # Print memory allocation | |||
"TORCH_NCCL_HIGH_PRIORITY": "1", # Enable high priority for NCCL communication in pytorch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@guyueh1 Can we move this to here?
https://github.com/NVIDIA/NeMo/blob/main/nemo/lightning/run/plugins.py#L387-L406
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved there; do we need any condition on applying that envvar, or always applying (as I do now)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think always applying should be fine. Had it enabled for all recent workloads I ran...
Signed-off-by: Guyue Huang <[email protected]>
Important
The
Update branch
button must only be pressed in very rare occassions.An outdated branch is never blocking the merge of a PR.
Please reach out to the automation team before pressing that button.
What does this PR do ?
Performance scripts updates
Collection: [Note which collection this PR will affect]
Changelog
Usage
# Add a code snippet demonstrating how to use this
GitHub Actions CI
The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.
The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".
Before your PR is "Ready for review"
Pre checks:
PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.
Who can review?
Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.
Additional Information