diff --git a/.github/scripts/build_triton_wheel.py b/.github/scripts/build_triton_wheel.py index c064b59ad93d..7ee2cb4b8e61 100644 --- a/.github/scripts/build_triton_wheel.py +++ b/.github/scripts/build_triton_wheel.py @@ -54,13 +54,19 @@ def patch_init_py( def patch_setup_py(path: Path) -> None: with open(path) as f: orig = f.read() - orig = check_and_replace( - orig, - "https://tritonlang.blob.core.windows.net/llvm-builds/", - "https://oaitriton.blob.core.windows.net/public/llvm-builds/", - ) - with open(path, "w") as f: - f.write(orig) + try: + orig = check_and_replace( + orig, + "https://tritonlang.blob.core.windows.net/llvm-builds/", + "https://oaitriton.blob.core.windows.net/public/llvm-builds/", + ) + with open(path, "w") as f: + f.write(orig) + except RuntimeError as e: + print( + f"Applying patch_setup_py() for llvm-build package failed: {e}.", + "If you are trying to build a newer version of Triton, you can ignore this.", + ) def build_triton(