Skip to content

ROCm/support GLM-4.7-Flash R3+MTP test#1612

Open
sreerohi wants to merge 1 commit into
radixark:mainfrom
sreerohi:rocm/glm47-flash-r3-mtp-ci
Open

ROCm/support GLM-4.7-Flash R3+MTP test#1612
sreerohi wants to merge 1 commit into
radixark:mainfrom
sreerohi:rocm/glm47-flash-r3-mtp-ci

Conversation

@sreerohi

Copy link
Copy Markdown

Mirrors the substitutions from PR #1126 (And related to #1153):

Supersedes #1242

Mirrors the substitutions from PR radixark#1126 (And related to radixark#1153):
- Set SGLANG_USE_AITER=0 (bypass aiter MoE silu_and_mul crash on gfx950)
- Add --use-miles-router (sglang router strips return_routed_experts;
  see sgl-project/sglang#20696)
- Add --ci-disable-logprobs-checker (ROCm numerical drift)
- Set MILES_TEST_R3_THRESHOLD=1.0 (tolerate MoE topk routing drift)

@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 and environment variables for the GLM-4.7-Flash end-to-end tests, such as enabling the miles router, disabling the logprobs checker, and setting environment variables like SGLANG_USE_AITER and MILES_TEST_R3_THRESHOLD. Feedback suggests using getattr when checking torch.version.hip to prevent potential AttributeError exceptions on PyTorch builds where the hip attribute is not defined.

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.

MODEL_TYPE = "glm4.7-flash"

TIGHT_HOST_MEMORY = bool(int(os.environ.get("MILES_TEST_TIGHT_HOST_MEMORY", "1")))
IS_ROCM = torch.version.hip is not None

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

Accessing torch.version.hip directly can raise an AttributeError on certain PyTorch builds or older versions where the hip attribute is not defined on the torch.version module. Using getattr is a safer and more robust way to check for ROCm/HIP support.

Suggested change
IS_ROCM = torch.version.hip is not None
IS_ROCM = getattr(torch.version, "hip", None) is not None

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