From 87c070187a4882090b4736a75948ad3a15e5db3d Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 12 Feb 2026 16:56:48 -0700 Subject: [PATCH 1/2] Fix pylint issues * Missing encoding with open * Missing a docstring * Suppress warning that `ais-check` isn't in snake_case via a .pylintrc file --- tools/ais-check/.pylintrc | 2 ++ tools/ais-check/ais-check | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 tools/ais-check/.pylintrc diff --git a/tools/ais-check/.pylintrc b/tools/ais-check/.pylintrc new file mode 100644 index 00000000..7ff0f948 --- /dev/null +++ b/tools/ais-check/.pylintrc @@ -0,0 +1,2 @@ +[MASTER] +ignore-patterns=^ais-check$ diff --git a/tools/ais-check/ais-check b/tools/ais-check/ais-check index 001a8fb1..d00a1e72 100755 --- a/tools/ais-check/ais-check +++ b/tools/ais-check/ais-check @@ -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 @@ -99,6 +99,10 @@ def amdgpu_supports_ais(): def main(args): + """ + Run the program + """ + parser = argparse.ArgumentParser() parser.add_argument( "-q", "--quiet", action="store_true", help="Silence regular output" From e5d4fbfc2f5966ec1d9f994233affcafb8007b06 Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Wed, 18 Feb 2026 09:30:29 -0800 Subject: [PATCH 2/2] Update tools/ais-check/ais-check Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- tools/ais-check/ais-check | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/ais-check/ais-check b/tools/ais-check/ais-check index d00a1e72..d715e8f9 100755 --- a/tools/ais-check/ais-check +++ b/tools/ais-check/ais-check @@ -100,7 +100,9 @@ def amdgpu_supports_ais(): def main(args): """ - Run the program + 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. """ parser = argparse.ArgumentParser()