Fix LLVM optimization bug causing infinite build on Apple Silicon#403
Open
Ayush10 wants to merge 1 commit intomicrosoft:mainfrom
Open
Fix LLVM optimization bug causing infinite build on Apple Silicon#403Ayush10 wants to merge 1 commit intomicrosoft:mainfrom
Ayush10 wants to merge 1 commit intomicrosoft:mainfrom
Conversation
LLVM's InterleavedLoadCombine pass triggers infinite recursion when compiling BitNet's vector shuffle patterns on Apple Silicon, causing builds to hang indefinitely. This affects both Apple Clang and Homebrew Clang (reported with versions 17.0.0 through 20.1.6). Added -mllvm -disable-interleaved-load-combine to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS, scoped to Darwin + arm64 only. Fixes microsoft#294
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-mllvm -disable-interleaved-load-combinecompiler flags tosetup_env.pyfor macOS ARM64 buildsInterleavedLoadCombineoptimization pass triggers infinite recursion on Apple Silicon when compiling BitNet's vector shuffle patterns, causing the build to hang indefinitelyDarwin + arm64only, so it does not affect x86, Linux, or Windows buildsRelated issues
Test plan
python setup_env.py -md models/BitNet-b1.58-2B-4T -q i2_son Apple Silicon Mac — verify build completes in minutes, not hoursFixes #294