Repository navigation
[OPUS] [gfx1250] Clear HIP sticky error after A0 strict-CO probe failure (#7185 follow-up) - #7505
Conversation
…failure #7185 added hip_module_accepts() as a capability probe: on an A0 node it tries hipModuleLoadData() on the gfx1250-strict (0xeb) code object and, when the HIP runtime is older than ROCm 10.1 and rejects it, falls back to the regular gfx1250 CO. The fallback works, but the failed probe leaves HIP's sticky last-error set to hipErrorNoBinaryForGpu and never clears it. A successful HIP call does not reset that record, so the stale error is inherited by the next unrelated HIP call (e.g. torch.empty during serving init) and aborts the process there, far from its real cause. Clear the recorded error with hipGetLastError() in the probe's failure branch so a failed capability probe leaves no error state behind. Validated on a real MI450 A0 node (torch HIP 7.16.26315, old runtime): without this line the DeepSeek-V4-Flash server dies at startup with hipErrorNoBinaryForGpu surfacing in torch.empty (matches the extended-test CI crash); with it the server starts, the expected "falling back to regular gfx1250 CO" warning prints once, and no HIP load error occurs. Note: this fixes only the startup crash. A separate, independent in-serving GPU memory access fault on A0 (unrelated to this sticky error) is tracked elsewhere and is out of scope for this PR. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
WAITING ON AUTHORPR Self-ReviewRevision Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision. Questions to answer in the PR description
Edit the Missing or invalid answers
Shadow mode reports what would block but keeps the status successful. Set |
Problem
On an MI450 A0 node running a HIP runtime older than ROCm 10.1, the DeepSeek-V4-Flash server crashes at startup with
hipErrorNoBinaryForGpusurfacing insidetorch.empty(this is the extended-test CI failure). The reported location is a red herring — nothing is actually wrong attorch.empty.Root cause
#7185 added
hip_module_accepts()as a capability probe: on A0 ithipModuleLoadData()s the gfx1250-strict (0xeb) code object and, when the old runtime rejects it, falls back to the regular gfx1250 CO. The fallback itself works — but the failed probe leaves HIP's sticky last-error set tohipErrorNoBinaryForGpuand never clears it. A later successful HIP call does not reset that record, so the stale error is inherited by the next unrelated HIP call (torch.emptyduring serving init) and aborts the process there.Fix
One line: clear the recorded error with
hipGetLastError()in the probe's failure branch, so a failed capability probe leaves no error state behind.Validation (real MI450 A0, torch HIP 7.16.26315, old runtime)
hipErrorNoBinaryForGpuintorch.empty(matches CI)[opus] ... falling back to regular gfx1250 CO(expected)hipErrorNoBinaryForGpu, noinvalid device function)A/B differ only by this one line; built-module check confirms it compiled in (
hipGetLastErrorrefs inmodule_deepgemm_opus.so: 0 → 1).Scope note
This fixes only the startup sticky-error crash. A separate, independent in-serving GPU memory access fault on A0 (reproduces across F4/A8W4, flydsl 0.4.1/0.4.2, and multiple aiter commits; unrelated to this sticky error) is being investigated separately and is out of scope here.
Draft pending the A0 A/B log attachment.
🤖 Generated with Claude Code