diff options
| author | DadaCap <167002618+DadaCap@users.noreply.github.com> | 2026-11-28 09:04:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-28 09:04:22 +0100 |
| commit | 20264ffa0a9d4546d86c2ba6f6b73c682b60c4eb (patch) | |
| tree | 5ffcae950688ba92abc4932c41a92fd4ad302da9 /scripts/run_gpu_tests.py | |
| parent | eb3a0d1f8dce39c51c05d4ba5b3315d3549755f6 (diff) | |
| parent | b1c1ae97b018ad46db9f1bc7c2258764d566e654 (diff) | |
Merge pull request #1978 from vinceychu/fix/run-gpu-tests-versioned-llvm-mc
run_gpu_tests: find a versioned llvm-mc when --llvm-mc and LLVM_MC are unset (TEST-RUN-GPU-TESTS-VERSIONED-LLVM-MC)
Diffstat (limited to 'scripts/run_gpu_tests.py')
| -rw-r--r-- | scripts/run_gpu_tests.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py index 37ce4f8b1..8b676f22d 100644 --- a/scripts/run_gpu_tests.py +++ b/scripts/run_gpu_tests.py | |||
| @@ -102,7 +102,7 @@ def make_ms_psv0(threads_x: int, maxv: int, maxp: int, topology: int = 2, group_ | |||
| 102 | TEXT_ONLY_MARK = "; run_gpu_tests: text only, llvm-mc has no gfx1013 encoding for an instruction here" | 102 | TEXT_ONLY_MARK = "; run_gpu_tests: text only, llvm-mc has no gfx1013 encoding for an instruction here" |
| 103 | 103 | ||
| 104 | 104 | ||
| 105 | def assemble_to_s(llvm_mc: str, asm_path: str, s_path: str, name: str) -> None: | 105 | def assemble_to_s(llvm_mc: str | None, asm_path: str, s_path: str, name: str) -> None: |
| 106 | """Assemble raw RDNA2 .asm with llvm-mc -show-encoding into .s format for rdna2spirv.py.""" | 106 | """Assemble raw RDNA2 .asm with llvm-mc -show-encoding into .s format for rdna2spirv.py.""" |
| 107 | with open(asm_path, encoding="utf-8") as source: | 107 | with open(asm_path, encoding="utf-8") as source: |
| 108 | raw = source.read() | 108 | raw = source.read() |
| @@ -780,8 +780,11 @@ def native_folder(path: str, ansi: str = "mbcs") -> str | None: | |||
| 780 | 780 | ||
| 781 | def main() -> int: | 781 | def main() -> int: |
| 782 | ap = argparse.ArgumentParser() | 782 | ap = argparse.ArgumentParser() |
| 783 | ap.add_argument("--llvm-mc", default=os.environ.get("LLVM_MC", "llvm-mc"), | 783 | # No literal default: unset, mc_command() reads LLVM_MC and then finds llvm-mc on PATH or a versioned |
| 784 | help="llvm-mc path, or a whole command such as 'wsl -d Ubuntu -e /usr/lib/llvm-21/bin/llvm-mc'") | 784 | # Debian/Ubuntu install (llvm-mc-21, /usr/lib/llvm-21/bin/llvm-mc), as the not-found message promises. |
| 785 | ap.add_argument("--llvm-mc", default=None, | ||
| 786 | help="llvm-mc path, or a whole command such as 'wsl -d Ubuntu -e /usr/lib/llvm-21/bin/llvm-mc' " | ||
| 787 | "(default: LLVM_MC, then llvm-mc on PATH, then the newest llvm-mc-<N>)") | ||
| 785 | ap.add_argument("--build", default=os.path.join(ROOT, "runtime", "build"), | 788 | ap.add_argument("--build", default=os.path.join(ROOT, "runtime", "build"), |
| 786 | help="CMake build folder; with the Visual Studio generator the RelWithDebInfo/Release/... " | 789 | help="CMake build folder; with the Visual Studio generator the RelWithDebInfo/Release/... " |
| 787 | "subfolder that has the test programs is found by itself") | 790 | "subfolder that has the test programs is found by itself") |