Skip to content

[hipFile] Add a check for ais capable filesystem mounts#7774

Open
akolliasAMD wants to merge 3 commits into
developfrom
users/akolliasamd/hipfile-volumes-check
Open

[hipFile] Add a check for ais capable filesystem mounts#7774
akolliasAMD wants to merge 3 commits into
developfrom
users/akolliasamd/hipfile-volumes-check

Conversation

@akolliasAMD

@akolliasAMD akolliasAMD commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

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

Copilot AI review requested due to automatic review settings June 24, 2026 19:53
@akolliasAMD akolliasAMD requested a review from a team as a code owner June 24, 2026 19:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread projects/hipfile/tools/ais-check/ais-check
Comment thread projects/hipfile/tools/ais-check/tests/test_volumes.py
Comment thread projects/hipfile/tools/ais-check/tests/test_main.py
Comment thread projects/hipfile/tools/ais-check/ais-check
@gaoikawa gaoikawa changed the title added a check for ais capable volumes [hipFile] Add a check for ais capable filesystem mounts Jun 24, 2026
"""
o_direct = getattr(os, "O_DIRECT", 0)
if o_direct == 0:
return None # platform has no O_DIRECT to test

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants