Skip to content

Commit

Permalink
[BUILD] Fix Triton build for Apple silicon macOS. (triton-lang#3443)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fkouteib committed Mar 23, 2024
1 parent dca2d07 commit 4271d00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4271d00

Please sign in to comment.