Skip to content

Commit 73d09c4

Browse files
karupayunvwbaker
andauthored
[BACKEND] Set LLVM_ABI_BREAKING_CHECKS to be able to update the llvm version (#4512)
This PR is setting LLVM_ABI_BREAKING_CHECKS=FORCE_OFF, similar of how we do it inside Google. In this way, we are forcing the structures that relies in Hashing.h to use a deterministic seed. We were not able to update the llvm version. The culprit llvm commit is llvm/llvm-project@ce80c80, that basically uses a non-deterministic seed if the previous "Flag" is set. There were some discussions in #4338, and the other option would be to check/replace code and tests that are overly depending on the determinism of llvm/include/llvm/ADT/Hashing.h (DenseMap and DenseSet mostly). I think that the priority is first to be able to update the llvm version, but if OpenAI is interested I could work on replacing them (for MapVector), in order to fix all the failing unit tests, and then we can set the LLVM_ABI_BREAKING_CHECKS again to "WITH_ASSERTS". - [x] I am not making a trivial change, such as fixing a typo in a comment. - [x] I have written a PR description following these [rules](https://cbea.ms/git-commit/#why-not-how). - [x] I have run `pre-commit run --from-ref origin/main --to-ref HEAD`. - [x] This PR does not need a test because it's just setting a variable for LLVM. - [x] I have not added any `lit` tests. Co-authored-by: Tori Baker <[email protected]>
1 parent 45af9a9 commit 73d09c4

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

.github/workflows/llvm-build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ jobs:
107107
-DLLVM_INSTALL_UTILS=ON
108108
-DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU"
109109
-DLLVM_ENABLE_TERMINFO=OFF
110+
-DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF
110111
llvm-project/llvm
111112
112113
ninja -C llvm-project/build check-mlir install
@@ -130,6 +131,7 @@ jobs:
130131
-DLLVM_INSTALL_UTILS=ON
131132
-DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU"
132133
-DLLVM_ENABLE_TERMINFO=OFF
134+
-DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF
133135
llvm-project/llvm
134136
135137
ninja -C llvm-project/build check-mlir install
@@ -175,6 +177,7 @@ jobs:
175177
-DCMAKE_LINKER=$LINKER \
176178
-DMLIR_ENABLE_BINDINGS_PYTHON=ON \
177179
-DLLVM_ENABLE_ZSTD=OFF \
180+
-DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF \
178181
-DLLVM_INSTALL_UTILS=ON \
179182
-DCMAKE_INSTALL_PREFIX="${{ env.llvm_install_dir }}" \
180183
-DLLVM_TARGETS_TO_BUILD="AArch64;NVPTX;AMDGPU" \
@@ -225,6 +228,7 @@ jobs:
225228
-DLLVM_TARGETS_TO_BUILD="AArch64;NVPTX;AMDGPU"
226229
-DLLVM_USE_HOST_TOOLS=ON
227230
-DLLVM_ENABLE_TERMINFO=OFF
231+
-DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF
228232
llvm-project/llvm
229233
230234
ninja -C llvm-project/build install

.github/workflows/llvm-build/almalinux.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ RUN cmake -GNinja -Bbuild \
3333
-DLLVM_ENABLE_PROJECTS=mlir \
3434
-DLLVM_ENABLE_TERMINFO=OFF \
3535
-DLLVM_INSTALL_UTILS=ON \
36+
-DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF \
3637
-DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" \
3738
/source/llvm-project/llvm
3839

cmake/llvm-hash.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4713bd4ccc0c0d568f92916e7851d993291742c0
1+
ce80c80dca45c7b4636a3e143973e2c6cbdb2884

0 commit comments

Comments
 (0)