Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tools/ais-check/.pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[MASTER]
ignore-patterns=^ais-check$
8 changes: 7 additions & 1 deletion tools/ais-check/ais-check
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def amdgpu_supports_ais():
Check if kfd_ais_rw_file is in the kernel's symbol table
"""
try:
with open("/proc/kallsyms", "r") as kallsyms:
with open("/proc/kallsyms", "r", encoding="utf-8") as kallsyms:
for line in kallsyms:
if "kfd_ais_rw_file" in line:
return True
Expand All @@ -99,6 +99,12 @@ def amdgpu_supports_ais():


def main(args):
"""
Parse command-line arguments, check AIS support in HIP Runtime and
amdgpu, optionally print the results, and return an exit code indicating
whether all required components support AIS.
Comment on lines 101 to +105
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

main(args) never uses the args parameter and then reassigns args = parser.parse_args(), which makes the parameter misleading and can trigger pylint warnings (unused-argument / redefined-argument-from-local). Either remove the parameter and call parse_args() directly, or parse the provided argv (e.g., parse_args(args[1:])) and avoid shadowing by using a different local name.

Copilot uses AI. Check for mistakes.
"""

parser = argparse.ArgumentParser()
parser.add_argument(
"-q", "--quiet", action="store_true", help="Silence regular output"
Expand Down