Repository navigation
fix(hrr): parse the lines decode-and-triage really receives - #14136
Conversation
check_replay_compat.py: - Windows HIP version: the patch is HIP_VERSION % 100000, as capture records it, not (v // 100) % 1000, so the two strings can match. - Windows GPU arch: read gcnArchName from hipDeviceProp_tR0000, which the exported hipGetDeviceProperties fills, instead of attribute 57 (hipDeviceAttributeMaxThreadsPerMultiProcessor) printed in hex. - Linux without rocm-smi: run `amd-smi static --asic` and parse its GPU/MARKET_NAME/TARGET_GRAPHICS_VERSION fields; amd-smi has no --showid/--showproductname, so the GPU count and arch checks were skipped. analyze_replay_finding.py: - CLR prints "Memory Fault Error" and the faulting-address bracket with separate log calls, so match the bracket on its own line. - hrr_reader prints "Version mismatch in <file>: file=N reader=M". - Take the kernel from the "[HRR] GPU error after '<kernel>'" line that --sync-after-launch prints when no runtime fault line names one. Tests use the lines the tools print, quoting each format string. Jira: AIRUNTIME-3062
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
There was a problem hiding this comment.
🟡 Changes recommended
Unavailable amd-smi architecture values cause false compatibility mismatches and can block replay under --strict-arch.
1 open issue
What changed in this PR
This PR aligns HRR’s decode-and-triage helpers with actual platform probe output and replay logs, improving compatibility checks and fault identification.
Changes:
- Correct Windows HIP version and GPU architecture probing.
- Add Linux GPU discovery through
amd-smi static --asic. - Recognize additional runtime fault, version mismatch, and synchronized-launch log formats, with regression tests.
| File | Description |
|---|---|
projects/hrr/skills/decode-and-triage/tests/test_check_replay_compat.py |
Adds mocked Windows and Linux probe coverage. |
projects/hrr/skills/decode-and-triage/tests/test_analyze_replay_finding.py |
Tests actual fault and replay log formats. |
projects/hrr/skills/decode-and-triage/tests/fixtures/version_mismatch.log |
Includes the filename emitted by the reader. |
projects/hrr/skills/decode-and-triage/scripts/check_replay_compat.py |
Fixes Windows probes and adds Linux amd-smi parsing. |
projects/hrr/skills/decode-and-triage/scripts/analyze_replay_finding.py |
Updates log matching and kernel-name fallback. |
Review effort: Balanced
amd-smi static --asic prints TARGET_GRAPHICS_VERSION: N/A when the ASIC query fails. The parser now keeps that GPU's slot as an empty string, so evaluate_compat() skips the comparison instead of reporting a mismatch, and the report shows it as n/a.
danielbolsson
left a comment
There was a problem hiding this comment.
Checked a3e776b: the Windows HIP patch parse, gcnArchName at offset 396, the amd-smi static --asic parser with N/A as an empty arch, and the three analyzer patterns. Nothing blocking.
Nit: check_replay_compat.py:711 - _parse_amd_smi_static can return fewer archs than count if a GPU block lacks TARGET_GRAPHICS_VERSION; pad with "" to count.
- test_check_replay_compat: drop the fake hipDeviceGetAttribute; the Windows probe no longer calls it, and the test still fails on develop. Keep only the amd-smi fields the probe reads in its sample output. - test_analyze_replay_finding: drop the fault_class and failing_call_index asserts and the Fatal line from the sync-after-launch test; they pass on develop and test_fatal_api_abort covers them. - Cite the CLR and HRR sources by file:line instead of pasting their format strings. - hrr_playback.cpp: quote the reader's mismatch line as hrr_reader.cpp:168 prints it. AIRUNTIME-3062: tests trimmed, the fix and its negative controls unchanged.
TheRock Submodule Bump ActivityNewest first
|

Motivation
The decode-and-triage skill misreads the HIP version and GPU arch on Windows. On Linux hosts with only
amd-smi, it never finds a GPU. Its analyzer also misses three log lines that CLR, the reader andhrr-playbackprint.Technical Details
check_replay_compat.py:HIP_VERSION % 100000, aship_capture_metadata.cpprecords it. Before, the two strings never matched.gcnArchNamefromhipDeviceProp_tR0000, which the exportedhipGetDevicePropertiesfills. Attribute 57 ishipDeviceAttributeMaxThreadsPerMultiProcessor, not the arch.rocm-smi: runamd-smi static --asicand read itsGPU,MARKET_NAMEandTARGET_GRAPHICS_VERSIONfields.amd-smirejects therocm-smioptions it got before.amd-smiprintsTARGET_GRAPHICS_VERSION: N/Awhen its ASIC query fails. That GPU keeps its place and skips the arch check.analyze_replay_finding.py:--sync-after-launchprints.hrr_playback.cpp: the--versioncomment quotes the mismatch line as the reader prints it.Each test fixture is a line the tools print, and its comment cites the source line that prints it. The
amd-smifields come fromamdsmi-cli-tool.md.Issue Tracking
JIRA ID: AIRUNTIME-3062
Test Plan
python3 -m pytest projects/hrr/skills/decode-and-triageandpython3 -m compileall -q projects/hrr/skillson head 31276d0, as the "HRR skills" workflow runs them.amd-smipath never ran against a realamd-smi.hrr_playback.cpp. No compiled code changes, so the PR carriesci:skip.Test Result
Submission Checklist