Add CI tests for AMD GPU accelerator detection (real-hardware fixtures) - #271
Add CI tests for AMD GPU accelerator detection (real-hardware fixtures)#271hmeiland wants to merge 2 commits into
Conversation
Adds workflow-based tests for both AMD detection methods in accelpath, using output captured from real hardware (AMD Radeon Pro V710, gfx1101) so no AMD GPU is required in CI: - Method 1 (KFD sysfs): make the topology root overridable via $EESSI_KFD_TOPOLOGY_ROOT so captured nodes/*/properties fixtures can be injected. Covers the gfx_target_version -> gfxMAJMINSTEP decode and the CPU-node (gfx_target_version 0) skip. - Method 2 (amd-smi): fake amd-smi stub on $PATH replaying real 'amd-smi static --asic' output, mirroring the existing nvidia-smi tests. New workflow tests_archdetect_amd_gpu.yml runs kfd_sysfs (v710, cpu_only) and amd_smi (v710) matrices. NVIDIA detection and the no-accelerator exit-2 path remain unchanged. This work was created with the help of AI (GitHub Copilot / an AI coding assistant).
|
The main reason for not merging #205 and #214 way back when was that we weren't ready to expose the AMD GPU software yet (i.e. it was only accessible by explicitely setting the |
|
Discussed in the support meeting. We think the time is right to actually expose this, i.e. add the archdetect support. Only challenge now is to find the time to review this PR :) |
|
Just as a note: from the brief look I gave it, this replaces #205, but NOT #214. I.e. if this PR is approved, we should close #205 as 'superseded' by this PR, but we should probably take #214 out of draft mode and still assess it. Note that #214 in the opening post also states we probably need to update |
on it... |
|
Superseded by #273. That PR consolidates AMD GPU accelerator detection in |
Summary
Adds workflow-based CI tests for AMD GPU accelerator detection in
eessi_archdetect.sh, building on the detection logic proposed in #205. All tests use output captured from real hardware (an AMD Radeon Pro V710 / NAVI32,gfx1101), so no AMD GPU is required in CI.This addresses the AMD-CI gap tracked in #214, complementing the detection work in #205.
What's covered
accelpath()'s AMD path (from #205) has two detection methods; this PR tests both:/sys/devices/virtual/kfd/kfd/topology/nodes/*/properties, noamd-smi/Python required). This is the path that fires on real AMD hardware whereamdgpu-archisn't inPATH. To make it testable without a GPU, the topology root is made overridable via$EESSI_KFD_TOPOLOGY_ROOT(defaults to the real sysfs path — behavior is unchanged when unset). Fixtures are capturednodes/*/propertiesfiles:v710→ node 0 is a CPU node (gfx_target_version 0, must be skipped), node 1 is the GPU (gfx_target_version 110001→gfx1101). Verifies thegfx_target_version → gfxMAJMINSTEPdecode and the CPU-node skip.cpu_only→ only a CPU node → no accelerator → exit 2.amd-smifallback: a fakeamd-smion$PATHreplays realamd-smi static --asicoutput (TARGET_GRAPHICS_VERSION: gfx1101), mirroring the existingnvidia-smitest pattern.Changes
init/eessi_archdetect.sh: one-line change making the KFD topology root overridable via$EESSI_KFD_TOPOLOGY_ROOT(test seam; default unchanged)..github/workflows/tests_archdetect_amd_gpu.yml: new workflow, analogous totests_archdetect_nvidia_gpu.yml, withkfd_sysfs(v710, cpu_only) andamd_smi(v710) matrices.tests/archdetect/kfd/{v710,cpu_only}/: captured KFD topology fixtures + expected output.tests/archdetect/amd-smi/:amd-smistub + expected output.Verification
Verified locally against the #205 branch, and the
gfx1101result was confirmed on the live V710 (both KFDgfx_target_version=110001andamd-smi TARGET_GRAPHICS_VERSION: gfx1101decode toaccel/amd/gfx1101):accel/amd/gfx1101accel/amd/gfx1101accel/nvidia/cc80(unchanged)Notes