Skip to content

rocm: disable gradient_accumulation_fusion on gfx950 in test_qwen2.5_0.5B_gsm8k#1617

Open
sreerohi wants to merge 1 commit into
radixark:mainfrom
sreerohi:rocm/bgradb-qwen-long
Open

rocm: disable gradient_accumulation_fusion on gfx950 in test_qwen2.5_0.5B_gsm8k#1617
sreerohi wants to merge 1 commit into
radixark:mainfrom
sreerohi:rocm/bgradb-qwen-long

Conversation

@sreerohi

Copy link
Copy Markdown

Depends on #1153.
hipBLASLt on gfx950 has no algorithm for TE's bias-fused wgrad GEMM (bf16→fp32 + BGRADB + accumulate). This conditionally disables gradient_accumulation_fusion and relaxes CI numerical checkers on ROCm. CUDA is unaffected.

Supersedes #1159

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces ROCm-specific configurations to the test_qwen2.5_0.5B_gsm8k.py end-to-end test, conditionally disabling the logprobs checker and gradient accumulation fusion when running on ROCm. The reviewer feedback suggests refactoring the string concatenation within the argument list to use f-string ternary expressions instead of mixing implicit and explicit string concatenation, which improves code readability and robustness.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +88 to +89
+ ("--ci-disable-logprobs-checker " if IS_ROCM else "")
+ "--ci-metric-checker-key eval/gsm8k "

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Mixing implicit string literal concatenation with explicit + operators inside parenthesized expressions is fragile and can easily lead to syntax errors or unexpected formatting during future modifications. Since Python supports implicit concatenation of f-strings, you can use an f-string ternary expression to keep the entire block as a single, cleanly concatenated string literal sequence.

Suggested change
+ ("--ci-disable-logprobs-checker " if IS_ROCM else "")
+ "--ci-metric-checker-key eval/gsm8k "
f"{'--ci-disable-logprobs-checker ' if IS_ROCM else ''}"
"--ci-metric-checker-key eval/gsm8k "

Comment on lines +99 to +100
+ ("--no-gradient-accumulation-fusion " if IS_ROCM else "")
+ "--attention-softmax-in-fp32 "

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similarly, using an f-string ternary expression here avoids mixing implicit and explicit string concatenation, keeping the parenthesized string clean and robust against future changes.

Suggested change
+ ("--no-gradient-accumulation-fusion " if IS_ROCM else "")
+ "--attention-softmax-in-fp32 "
f"{'--no-gradient-accumulation-fusion ' if IS_ROCM else ''}"
"--attention-softmax-in-fp32 "

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.

1 participant