rocm/ci: disable gradient accumulation fusion for GLM-4-9B on ROCm#1166
Open
sreerohi wants to merge 1 commit into
Open
rocm/ci: disable gradient accumulation fusion for GLM-4-9B on ROCm#1166sreerohi wants to merge 1 commit into
sreerohi wants to merge 1 commit into
Conversation
TE fused wgrad GEMM fails with 'Unable to find any suitable algorithms' on MI350. Add --no-gradient-accumulation-fusion gated on ROCm.
Contributor
There was a problem hiding this comment.
Code Review
This pull request modifies the GLM4-9B end-to-end test to include a check for ROCm environments, which triggers the addition of the --no-gradient-accumulation-fusion argument. The review feedback suggests simplifying the ROCm detection logic by removing a redundant hasattr check to align with existing codebase patterns.
|
|
||
| ENABLE_EVAL = U.get_bool_env_var("MILES_TEST_ENABLE_EVAL", "1") | ||
| TIGHT_DEVICE_MEMORY = U.get_bool_env_var("MILES_TEST_TIGHT_DEVICE_MEMORY", "1") | ||
| IS_ROCM = hasattr(torch.version, "hip") and torch.version.hip is not None |
Contributor
There was a problem hiding this comment.
For consistency with other parts of the codebase (e.g., miles/backends/megatron_utils/model.py line 809, which uses if torch.version.hip:) and for conciseness, you can simplify this check. The torch.version.hip attribute is guaranteed to exist and will be None on non-ROCm builds, so the hasattr check is redundant.
Suggested change
| IS_ROCM = hasattr(torch.version, "hip") and torch.version.hip is not None | |
| IS_ROCM = torch.version.hip is not None |
References
- Maintain consistency with existing patterns in the repository for checking ROCm availability and avoid redundant hasattr checks for attributes guaranteed to exist in the environment. (link)
80 tasks
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.
TE fused wgrad GEMM fails with 'Unable to find any suitable algorithms' on MI350. Add --no-gradient-accumulation-fusion gated on ROCm.
Relates to #1105