From 4271d00cd5dd27d0a753116c66513b33e94fcfce Mon Sep 17 00:00:00 2001 From: Faycel Kouteib Date: Sat, 23 Mar 2024 11:21:52 -0700 Subject: [PATCH] [BUILD] Fix Triton build for Apple silicon macOS. (#3443) Linux and macOS use different processor/ISA string identifiers for their ARM64 variants. So the macOS build was falling thru in cmake config, then later trying to link against x86 libraries and failing to find them in the LLVM librarries bundle for macOS-ARM. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a08fee73d50..737f4e81dbf5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -205,7 +205,8 @@ if(TRITON_BUILD_PYTHON_MODULE) LLVMAMDGPUAsmParser ) - if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") + if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64" OR # Linux arm64 + CMAKE_SYSTEM_PROCESSOR MATCHES "arm64") # macOS arm64 list(APPEND TRITON_LIBRARIES LLVMAArch64CodeGen LLVMAArch64AsmParser