Repository navigation
fix(ci): guard Unix-only fcntl import in Windows driver/GPU sanity check - #7820
amd-justchen merged 1 commit into
Conversation
ROCm#7360 added a module-level `import fcntl` to print_driver_gpu_info.py. fcntl is a Unix-only module, so the Driver / GPU sanity check step now crashes on every Windows CI runner with ModuleNotFoundError: No module named 'fcntl', failing sanity and skipping all Windows component tests. The KFD ioctl query that needs fcntl only runs on Linux (/dev/kfd), so move the import into _get_kfd_version() where it is used. No behavior change on Linux; Windows now runs the sanity check to completion. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
ScottTodd
left a comment
There was a problem hiding this comment.
Would have preferred a revert instead of a fix-forward.
This looks correct though, so okay. (tested on my Windows machine too)
|
Validated end-to-end on a Windows gfx1201 (Radeon AI PRO R9700) runner by dispatching https://github.com/ROCm/TheRock/actions/runs/33566391044 -> success
Sanity check passed and the |
Fair enough! My agent happened to have discovered it while trying to get a new runner up. Seems like a reasonable fix. |
|
https://github.com/ROCm/TheRock/actions/runs/33566263802/job/100067935852?pr=7820 |
…#7820) Re-point the pinned ROCm/TheRock ref from 1f1f06b to 648a501, which includes ROCm/TheRock#7820 (guard Unix-only fcntl import in the Windows driver/GPU sanity check) so the newer TheRock does not break the Windows test lane.
Bump the pinned `ROCm/TheRock` ref from `b45a060` (2026-08-26) to `648a501` (2026-09-02) across the TheRock CI workflows. Per Luis Machado's recommendation on #9738: rocm-systems' TheRock ref needs bumping to something recent so those builds pass as they do on TheRock `main`. `648a501` is the current TheRock `main` tip and includes [ROCm/TheRock#7820](ROCm/TheRock#7820) (guard Unix-only `fcntl` import in the Windows driver/GPU sanity check), so this newer ref does not break the Windows test lane. Updates all 15 workflow files that share the develop TheRock pin (21 occurrences: checkout `ref:` lines and rccl `therock_ref` input defaults). The intentionally separate multi-arch pin (`3c4ec01`) is left unchanged. Ref: #9738
Motivation
#7360 added a module-level
import fcntltobuild_tools/print_driver_gpu_info.py.fcntlis a Unix-only stdlib module,so the
Driver / GPU sanity checkstep (which runs this script) now crashes atimport time on every Windows CI runner:
That fails the Windows sanity job and skips every downstream Windows component
test. The only use of
fcntlis in_get_kfd_version(), which reads the KFDioctl version from
/dev/kfdand is only reached on the Linux path -- Windowsshould never have imported the module.
ISSUE ID: N/A (regression from #7360)
Technical Details
Move
import fcntlout of module scope into_get_kfd_version(), its sole user.That function only runs on Linux, so the Unix-only import now happens only where
it is valid. No functional change on Linux.
Test Plan
print_driver_gpu_info.pyon Windows Server 2025, before vs after.function that uses it).
Test Result
ModuleNotFoundError: No module named 'fcntl'at import.hipInfo.exepath and skipping the Linux-only KFD block.passes
Driver / GPU sanity checkand runs theorigamigfx1201 component testgreen on a Windows R9700 runner.
Submission Checklist