From b12e0473e3750471aea068679a072b668770dbe4 Mon Sep 17 00:00:00 2001 From: erick-xanadu <110487834+erick-xanadu@users.noreply.github.com> Date: Fri, 8 Nov 2024 16:41:37 -0500 Subject: [PATCH] [BUILD SYSTEM] Remove zstd (#1291) **Context:** We do not want to ship zstd. **Description of the Change:** Removes zstd from LLVM build process. **Benefits:** No zstd. **Possible Drawbacks:** Possibly our bytecode takes more space. **Related GitHub Issues:** We will need to remove all caches for this change to take into effect. --- .github/workflows/build-wheel-linux-x86_64.yaml | 12 ++++++------ .github/workflows/build-wheel-macos-arm64.yaml | 12 ++++++------ .github/workflows/build-wheel-macos-x86_64.yaml | 12 ++++++------ .../scripts/linux_arm64/rh8/build_catalyst.sh | 4 ++-- .../workflows/scripts/linux_arm64/rh8/build_llvm.sh | 4 ++-- .../workflows/scripts/linux_arm64/rh8/build_mhlo.sh | 4 ++-- mlir/Makefile | 4 ++-- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build-wheel-linux-x86_64.yaml b/.github/workflows/build-wheel-linux-x86_64.yaml index 825ce2f65e..e83a88a640 100644 --- a/.github/workflows/build-wheel-linux-x86_64.yaml +++ b/.github/workflows/build-wheel-linux-x86_64.yaml @@ -179,8 +179,8 @@ jobs: -DLLVM_ENABLE_PROJECTS="mlir" \ -DLLVM_ENABLE_ASSERTIONS=ON \ -DLLVM_INSTALL_UTILS=ON \ - -DLLVM_ENABLE_ZLIB=OFF \ - -DLLVM_ENABLE_ZSTD=FORCE_ON \ + -DLLVM_ENABLE_ZLIB=FORCE_ON \ + -DLLVM_ENABLE_ZSTD=OFF \ -DMLIR_ENABLE_BINDINGS_PYTHON=ON \ -DPython3_EXECUTABLE=$(which python${{ matrix.python_version }}) \ -DPython3_NumPy_INCLUDE_DIRS=$(python${{ matrix.python_version }} -c "import numpy as np; print(np.get_include())") \ @@ -215,8 +215,8 @@ jobs: -DLLVM_ENABLE_ASSERTIONS=ON \ -DMLIR_DIR=$GITHUB_WORKSPACE/llvm-build/lib/cmake/mlir \ -DPython3_EXECUTABLE=$(which python${{ matrix.python_version }}) \ - -DLLVM_ENABLE_ZLIB=OFF \ - -DLLVM_ENABLE_ZSTD=FORCE_ON \ + -DLLVM_ENABLE_ZLIB=FORCE_ON \ + -DLLVM_ENABLE_ZSTD=OFF \ -DCMAKE_CXX_VISIBILITY_PRESET=protected \ -DLLVM_ENABLE_LLD=ON @@ -375,8 +375,8 @@ jobs: -DMHLO_BINARY_DIR=$GITHUB_WORKSPACE/mhlo-build/bin \ -DEnzyme_DIR=$GITHUB_WORKSPACE/enzyme-build \ -DENZYME_SRC_DIR=$GITHUB_WORKSPACE/mlir/Enzyme \ - -DLLVM_ENABLE_ZLIB=OFF \ - -DLLVM_ENABLE_ZSTD=FORCE_ON \ + -DLLVM_ENABLE_ZLIB=FORCE_ON \ + -DLLVM_ENABLE_ZSTD=OFF \ -DLLVM_ENABLE_LLD=ON cmake --build quantum-build --target check-dialects compiler_driver catalyst-cli diff --git a/.github/workflows/build-wheel-macos-arm64.yaml b/.github/workflows/build-wheel-macos-arm64.yaml index 5d6be17222..4b1a2aee55 100644 --- a/.github/workflows/build-wheel-macos-arm64.yaml +++ b/.github/workflows/build-wheel-macos-arm64.yaml @@ -144,8 +144,8 @@ jobs: -DLLVM_ENABLE_PROJECTS="mlir" \ -DLLVM_ENABLE_ASSERTIONS=ON \ -DLLVM_INSTALL_UTILS=ON \ - -DLLVM_ENABLE_ZLIB=OFF \ - -DLLVM_ENABLE_ZSTD=FORCE_ON \ + -DLLVM_ENABLE_ZLIB=FORCE_ON \ + -DLLVM_ENABLE_ZSTD=OFF \ -DLLVM_ENABLE_LLD=OFF \ -DMLIR_ENABLE_BINDINGS_PYTHON=ON \ -DPython3_EXECUTABLE=$(which python${{ matrix.python_version }}) \ @@ -180,8 +180,8 @@ jobs: -DMLIR_DIR=$GITHUB_WORKSPACE/llvm-build/lib/cmake/mlir \ -DPython3_EXECUTABLE=$(which python${{ matrix.python_version }}) \ -DLLVM_ENABLE_LLD=OFF \ - -DLLVM_ENABLE_ZLIB=OFF \ - -DLLVM_ENABLE_ZSTD=FORCE_ON \ + -DLLVM_ENABLE_ZLIB=FORCE_ON \ + -DLLVM_ENABLE_ZSTD=OFF \ -DCMAKE_CXX_VISIBILITY_PRESET=hidden cmake --build mhlo-build --target check-mlir-hlo @@ -339,8 +339,8 @@ jobs: -DMHLO_BINARY_DIR=$GITHUB_WORKSPACE/mhlo-build/bin \ -DEnzyme_DIR=$GITHUB_WORKSPACE/enzyme-build \ -DENZYME_SRC_DIR=$GITHUB_WORKSPACE/mlir/Enzyme \ - -DLLVM_ENABLE_ZLIB=OFF \ - -DLLVM_ENABLE_ZSTD=FORCE_ON \ + -DLLVM_ENABLE_ZLIB=FORCE_ON \ + -DLLVM_ENABLE_ZSTD=OFF \ -DLLVM_ENABLE_LLD=OFF \ -DLLVM_DIR=$GITHUB_WORKSPACE/llvm-build/lib/cmake/llvm diff --git a/.github/workflows/build-wheel-macos-x86_64.yaml b/.github/workflows/build-wheel-macos-x86_64.yaml index eebc346fd4..779e499867 100644 --- a/.github/workflows/build-wheel-macos-x86_64.yaml +++ b/.github/workflows/build-wheel-macos-x86_64.yaml @@ -140,8 +140,8 @@ jobs: -DLLVM_ENABLE_PROJECTS="mlir" \ -DLLVM_ENABLE_ASSERTIONS=ON \ -DLLVM_INSTALL_UTILS=ON \ - -DLLVM_ENABLE_ZLIB=OFF \ - -DLLVM_ENABLE_ZSTD=FORCE_ON \ + -DLLVM_ENABLE_ZLIB=FORCE_ON \ + -DLLVM_ENABLE_ZSTD=OFF \ -DLLVM_ENABLE_LLD=OFF \ -DMLIR_ENABLE_BINDINGS_PYTHON=ON \ -DPython3_EXECUTABLE=$(which python${{ matrix.python_version }}) \ @@ -176,8 +176,8 @@ jobs: -DMLIR_DIR=$GITHUB_WORKSPACE/llvm-build/lib/cmake/mlir \ -DPython3_EXECUTABLE=$(which python${{ matrix.python_version }}) \ -DLLVM_ENABLE_LLD=OFF \ - -DLLVM_ENABLE_ZLIB=OFF \ - -DLLVM_ENABLE_ZSTD=FORCE_ON \ + -DLLVM_ENABLE_ZLIB=FORCE_ON \ + -DLLVM_ENABLE_ZSTD=OFF \ -DCMAKE_CXX_VISIBILITY_PRESET=hidden cmake --build mhlo-build --target check-mlir-hlo @@ -330,8 +330,8 @@ jobs: -DMHLO_BINARY_DIR=$GITHUB_WORKSPACE/mhlo-build/bin \ -DEnzyme_DIR=$GITHUB_WORKSPACE/enzyme-build \ -DENZYME_SRC_DIR=$GITHUB_WORKSPACE/mlir/Enzyme \ - -DLLVM_ENABLE_ZLIB=OFF \ - -DLLVM_ENABLE_ZSTD=FORCE_ON \ + -DLLVM_ENABLE_ZLIB=FORCE_ON \ + -DLLVM_ENABLE_ZSTD=OFF \ -DLLVM_ENABLE_LLD=OFF cmake --build quantum-build --target check-dialects compiler_driver catalyst-cli diff --git a/.github/workflows/scripts/linux_arm64/rh8/build_catalyst.sh b/.github/workflows/scripts/linux_arm64/rh8/build_catalyst.sh index bb517160f6..bc37f6cc46 100644 --- a/.github/workflows/scripts/linux_arm64/rh8/build_catalyst.sh +++ b/.github/workflows/scripts/linux_arm64/rh8/build_catalyst.sh @@ -70,8 +70,8 @@ cmake -S mlir -B quantum-build -G Ninja \ -DMHLO_BINARY_DIR=/catalyst/mhlo-build/bin \ -DEnzyme_DIR=/catalyst/enzyme-build \ -DENZYME_SRC_DIR=/catalyst/mlir/Enzyme \ - -DLLVM_ENABLE_ZLIB=OFF \ - -DLLVM_ENABLE_ZSTD=FORCE_ON \ + -DLLVM_ENABLE_ZLIB=FORCE_ON \ + -DLLVM_ENABLE_ZSTD=OFF \ -DLLVM_ENABLE_LLD=ON \ -DLLVM_DIR=/catalyst/llvm-build/lib/cmake/llvm cmake --build quantum-build --target check-dialects compiler_driver catalyst-cli diff --git a/.github/workflows/scripts/linux_arm64/rh8/build_llvm.sh b/.github/workflows/scripts/linux_arm64/rh8/build_llvm.sh index 78bb6aadb8..9f17391f8a 100644 --- a/.github/workflows/scripts/linux_arm64/rh8/build_llvm.sh +++ b/.github/workflows/scripts/linux_arm64/rh8/build_llvm.sh @@ -41,8 +41,8 @@ cmake -S /catalyst/mlir/llvm-project/llvm -B /catalyst/llvm-build -G Ninja \ -DLLVM_ENABLE_PROJECTS="mlir" \ -DLLVM_ENABLE_ASSERTIONS=ON \ -DLLVM_INSTALL_UTILS=ON \ - -DLLVM_ENABLE_ZLIB=OFF \ - -DLLVM_ENABLE_ZSTD=FORCE_ON \ + -DLLVM_ENABLE_ZLIB=FORCE_ON \ + -DLLVM_ENABLE_ZSTD=OFF \ -DLLVM_ENABLE_LLD=ON \ -DMLIR_ENABLE_BINDINGS_PYTHON=ON \ -DPython3_EXECUTABLE=/usr/bin/python3 \ diff --git a/.github/workflows/scripts/linux_arm64/rh8/build_mhlo.sh b/.github/workflows/scripts/linux_arm64/rh8/build_mhlo.sh index 2a5b2e4fa7..b6b4561f32 100644 --- a/.github/workflows/scripts/linux_arm64/rh8/build_mhlo.sh +++ b/.github/workflows/scripts/linux_arm64/rh8/build_mhlo.sh @@ -47,8 +47,8 @@ cmake -S /catalyst/mlir/mlir-hlo -B /catalyst/mhlo-build -G Ninja \ -DMLIR_DIR=/catalyst/llvm-build/lib/cmake/mlir \ -DPython3_EXECUTABLE=/usr/bin/python3 \ -DLLVM_ENABLE_LLD=ON \ - -DLLVM_ENABLE_ZLIB=OFF \ - -DLLVM_ENABLE_ZSTD=FORCE_ON \ + -DLLVM_ENABLE_ZLIB=FORCE_ON \ + -DLLVM_ENABLE_ZSTD=OFF \ -DCMAKE_CXX_VISIBILITY_PRESET=protected LIT_FILTER_OUT="chlo_legalize_to_mhlo" cmake --build /catalyst/mhlo-build --target check-mlir-hlo diff --git a/mlir/Makefile b/mlir/Makefile index 2cb8de388a..1a45c013ad 100644 --- a/mlir/Makefile +++ b/mlir/Makefile @@ -24,8 +24,8 @@ SYMBOL_VISIBILITY := protected endif ENABLE_LLD?=$(DEFAULT_ENABLE_LLD) -ENABLE_ZLIB?=OFF -ENABLE_ZSTD?=ON +ENABLE_ZLIB?=ON +ENABLE_ZSTD?=OFF ifeq ($(ENABLE_ASAN), ON) USE_SANITIZER_NAMES="Address"