diff --git a/.github/workflows/llvm-build.yml b/.github/workflows/llvm-build.yml index 453fdf5ce722..8158acebdee1 100644 --- a/.github/workflows/llvm-build.yml +++ b/.github/workflows/llvm-build.yml @@ -31,7 +31,6 @@ jobs: config: - {runner: 'Ubuntu 22.04', runs_on: 'ubuntu-22.04', target-os: 'ubuntu', arch: 'x64'} - {runner: 'Ubuntu 22.04 ARM64', runs_on: 'ubuntu-22.04', target-os: 'ubuntu', arch: 'arm64'} - - {runner: 'CentOS 7', runs_on: ['self-hosted', 'CPU'], target-os: 'centos', arch: 'x64'} - {runner: 'AlmaLinux 8', runs_on: ['self-hosted', 'CPU'], target-os: 'almalinux', arch: 'x64'} - {runner: 'AlmaLinux 8 ARM64', runs_on: 'ubuntu-22.04-arm', target-os: 'almalinux', arch: 'arm64'} - {runner: 'MacOS X64', runs_on: 'macos-13', target-os: 'macos', arch: 'x64'} @@ -233,30 +232,6 @@ jobs: tar czf "${{ env.llvm_install_dir }}.tar.gz" "${{ env.llvm_install_dir }}" - - - name: Configure, Build, Test, and Install LLVM (CentOS) - if: matrix.config.target-os == 'centos' - run: | - # if this step crashes, it can leave behind a stale docker container - docker container prune -f - docker rmi -f $(docker images -q) - - docker build --tag llvm-build --build-arg llvm_dir=llvm-project \ - -f llvm-build/.github/workflows/llvm-build/centos.Dockerfile . - - # Create temporary container to copy cache and installed artifacts. - CONTAINER_ID=$(docker create llvm-build) - docker cp "${CONTAINER_ID}:/install" "${{ env.llvm_install_dir }}" - tar czf "${{ env.llvm_install_dir }}.tar.gz" "${{ env.llvm_install_dir }}" - - # We remove the existing directory, otherwise docker will - # create a subdirectory inside the existing directory. - rm -rf "${{ env.SCCACHE_DIR }}" - docker cp "${CONTAINER_ID}:/sccache" "${{ env.SCCACHE_DIR }}" - sudo chown -R "$(id -u -n):$(id -g -n)" "${{ env.SCCACHE_DIR }}" - - docker rm "${CONTAINER_ID}" - - name: Configure, Build, Test, and Install LLVM (AlmaLinux) if: matrix.config.target-os == 'almalinux' run: | diff --git a/.github/workflows/llvm-build/centos.Dockerfile b/.github/workflows/llvm-build/centos.Dockerfile deleted file mode 100644 index 9d20a8ecc329..000000000000 --- a/.github/workflows/llvm-build/centos.Dockerfile +++ /dev/null @@ -1,56 +0,0 @@ -FROM centos:7 -ARG llvm_dir=llvm-project -# Add the cache artifacts and the LLVM source tree to the container -ADD sccache /sccache -ADD "${llvm_dir}" /source/llvm-project -ENV SCCACHE_DIR="/sccache" -ENV SCCACHE_CACHE_SIZE="2G" - -RUN echo -e "[llvmtoolset-build]\nname=LLVM Toolset 13.0 - Build\nbaseurl=https://buildlogs.centos.org/c7-llvm-toolset-13.0.x86_64/\ngpgcheck=0\nenabled=1" > /etc/yum.repos.d/llvmtoolset-build.repo - -# Note: This is required patch since CentOS have reached EOL -# otherwise any yum install setp will fail -RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo -RUN sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo -RUN sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo - -# Install build dependencies -RUN yum install --assumeyes centos-release-scl - -# The definition of insanity is doing the same thing and expecting a different result -RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo -RUN sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo -RUN sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo - -RUN yum install --assumeyes --nogpgcheck llvm-toolset-13.0 -RUN yum install --assumeyes rh-python38-python-devel rh-python38-python-pip -SHELL [ "/usr/bin/scl", "enable", "llvm-toolset-13.0", "rh-python38" ] - -RUN python3 -m pip install --upgrade pip -RUN python3 -m pip install --upgrade cmake ninja sccache - -# Install MLIR's Python Dependencies -RUN python3 -m pip install -r /source/llvm-project/mlir/python/requirements.txt - -# Configure, Build, Test, and Install LLVM -RUN cmake -GNinja -Bbuild \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_C_COMPILER=clang \ - -DCMAKE_CXX_COMPILER=clang++ \ - -DCMAKE_ASM_COMPILER=clang \ - -DCMAKE_C_COMPILER_LAUNCHER=sccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \ - -DCMAKE_CXX_FLAGS="-Wno-everything" \ - -DCMAKE_LINKER=lld \ - -DCMAKE_INSTALL_PREFIX="/install" \ - -DLLVM_BUILD_UTILS=ON \ - -DLLVM_BUILD_TOOLS=ON \ - -DLLVM_ENABLE_ASSERTIONS=ON \ - -DMLIR_ENABLE_BINDINGS_PYTHON=OFF \ - -DLLVM_ENABLE_PROJECTS="mlir;lld" \ - -DLLVM_ENABLE_TERMINFO=OFF \ - -DLLVM_INSTALL_UTILS=ON \ - -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" \ - /source/llvm-project/llvm - -RUN ninja -C build install diff --git a/setup.py b/setup.py index 9996e6072b68..1af8e37fcf70 100644 --- a/setup.py +++ b/setup.py @@ -217,14 +217,10 @@ def get_llvm_package_info(): # Ubuntu 22 LTS (v2.35) # Ubuntu 20 LTS (v2.31) system_suffix = "ubuntu-x64" - elif vglibc > 217: + else: # Manylinux_2.28 (v2.28) # AlmaLinux 8 (v2.28) system_suffix = "almalinux-x64" - else: - # Manylinux_2014 (v2.17) - # CentOS 7 (v2.17) - system_suffix = "centos-x64" else: print( f"LLVM pre-compiled image is not available for {system}-{arch}. Proceeding with user-configured LLVM from source build."