[hipFile] Add a check for ais capable filesystem mounts#7774
[hipFile] Add a check for ais capable filesystem mounts#7774akolliasAMD wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the ais-check tool to scan mounted volumes and report whether any mounted filesystem appears hipFile fast-path capable (supported filesystem + O_DIRECT open succeeds), and adds unit tests covering the new volume-scanning behavior.
Changes:
- Add mount scanning/parsing, filesystem eligibility checks, O_DIRECT probing, and a printed “Mounted volumes” table to
ais-check. - Include “hipFile-capable volume” in the component summary (and exit-code decision).
- Add new tests for volume scanning and update
main()tests to stub volume scanning.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
projects/hipfile/tools/ais-check/ais-check |
Implements mountinfo parsing, volume capability scoring, prints volume table, and includes volume capability in overall AIS readiness. |
projects/hipfile/tools/ais-check/tests/test_volumes.py |
Adds a new hermetic test suite for the volume-scanning logic. |
projects/hipfile/tools/ais-check/tests/test_main.py |
Updates main() tests to stub capable_volumes() and asserts volume output/exit-code behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| """ | ||
| o_direct = getattr(os, "O_DIRECT", 0) | ||
| if o_direct == 0: | ||
| return None # platform has no O_DIRECT to test |
There was a problem hiding this comment.
I went down a bit of a rabbit hole to try to understand this condition. os.O_DIRECT is not present if the C library being used at compile time of the Python interpreter does not define O_DIRECT. This is subtly different from the OS/kernel not supporting O_DIRECT.
I think this supports returning None in this instance, but perhaps the comment can be rephrased to specify this nuance of the C library Python is linked to rather than making a comment about the platform itself? Since we only return False if the kernel/OS verifiably reject the IO for having a bad flag value (and we already checked that the FS supports O_DIRECT operations).
Motivation
Adding listing of available mounts
Technical Details
Python script addition to ais-check that prints out ais capable mounts. The ais-check will fail if it doesnt find them
JIRA ID
AIHIPFILE-153
Test Plan
Test Result
Submission Checklist