[perf] fix: guard cuda_graph_scope validation against None#3249
Merged
Conversation
Move the TE scope validation after both `cuda_graph_impl` and `cuda_graph_scope` writes so it checks the effective recipe state instead of the raw CLI input. When `cuda_graph_scope` is not passed on the CLI the recipe default (set by set_workload_base_configs) is used, and the old code crashed with `TypeError: 'NoneType' object is not iterable` before reaching the None guard. Fixes #3247 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis change fixes a bug where Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
malay-nagda
approved these changes
Apr 10, 2026
Contributor
|
/ok to test 3c54dfb |
svcnvidia-nemo-ci
pushed a commit
that referenced
this pull request
Apr 10, 2026
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: NeMo Bot <nemo-bot@nvidia.com>
yaoyu-33
added a commit
to conver334/Megatron-Bridge
that referenced
this pull request
Apr 10, 2026
…Mo#3249) Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
TypeError: 'NoneType' object is not iterablein_set_cuda_graph_overrides()whencuda_graph_scopeis not passed via CLIcuda_graph_implandcuda_graph_scopewrites so it validates the effective recipe state, not the raw CLI inputcuda_graph_scopeis omitted, the recipe default fromset_workload_base_configs()is now correctly usedFixes #3247
Test plan
python scripts/performance/run_script.py --cuda_graph_impl transformer_engine -m gpt_oss -mr gpt_oss_120b -g b300 -c bf16 --task pretrain -ng 64 -gn 8 -tp 1 -pp 1 -ep 8 -mb 4 -gb 1280 --detach falsewithout--cuda_graph_scope— should no longer crash--cuda_graph_scope attn mlp— should still work--cuda_graph_scope bogus— should raiseAssertionErrorwith a clear message🤖 Generated with Claude Code
Summary by CodeRabbit