Add CI tests for AMD GPU accelerator detection (real-hardware fixtures)#271
Open
hmeiland wants to merge 2 commits into
Open
Add CI tests for AMD GPU accelerator detection (real-hardware fixtures)#271hmeiland wants to merge 2 commits into
hmeiland 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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