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..d715e8f9 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,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. + """ + parser = argparse.ArgumentParser() parser.add_argument( "-q", "--quiet", action="store_true", help="Silence regular output"