ROCm/support GLM-4.7-Flash R3+MTP test#1612
Conversation
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)
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
| IS_ROCM = torch.version.hip is not None | |
| IS_ROCM = getattr(torch.version, "hip", None) is not None |
Mirrors the substitutions from PR #1126 (And related to #1153):
Supersedes #1242