diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 3cdaafa24..f1a2d73b9 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -6,6 +6,9 @@ ### Improvements +* Update Linux wheels to use manylinux_2_28 images. + [(#667)](https://github.com/PennyLaneAI/pennylane-lightning/pull/667) + ### Documentation ### Bug fixes @@ -14,6 +17,8 @@ This release contains contributions from (in alphabetical order): +Amintor Dusko + --- # Release 0.36.0 diff --git a/.github/workflows/wheel_linux_aarch64.yml b/.github/workflows/wheel_linux_aarch64.yml index 498bdcce6..66acb86df 100644 --- a/.github/workflows/wheel_linux_aarch64.yml +++ b/.github/workflows/wheel_linux_aarch64.yml @@ -32,7 +32,7 @@ jobs: arch: [aarch64] exec_model: ${{ fromJson(needs.set_wheel_build_matrix.outputs.exec_model) }} kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }} - container_img: ["quay.io/pypa/manylinux2014_aarch64"] + container_img: ["quay.io/pypa/manylinux_2_28_aarch64"] timeout-minutes: 45 name: Kokkos core (${{ matrix.exec_model }}::${{ matrix.arch }}) runs-on: ${{ matrix.os }} @@ -91,7 +91,7 @@ jobs: cibw_build: ${{ fromJson(needs.set_wheel_build_matrix.outputs.python_version) }} exec_model: ${{ fromJson(needs.set_wheel_build_matrix.outputs.exec_model) }} kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }} - container_img: ["quay.io/pypa/manylinux2014_aarch64"] + container_img: ["quay.io/pypa/manylinux_2_28_aarch64"] timeout-minutes: 45 name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11", "cp312-*":"3.12" }')[matrix.cibw_build] }}) runs-on: ${{ matrix.os }} @@ -135,7 +135,7 @@ jobs: CIBW_ENVIRONMENT: PL_BACKEND="${{ matrix.pl_backend }}" CMAKE_ARGS="-DENABLE_LAPACK=OFF" - CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014 + CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 CIBW_BUILD_VERBOSITY: 3 diff --git a/.github/workflows/wheel_linux_ppc64le.yml b/.github/workflows/wheel_linux_ppc64le.yml index 51a988b21..ab089bbf1 100644 --- a/.github/workflows/wheel_linux_ppc64le.yml +++ b/.github/workflows/wheel_linux_ppc64le.yml @@ -32,7 +32,7 @@ jobs: arch: [ppc64le] exec_model: ${{ fromJson(needs.set_wheel_build_matrix.outputs.exec_model) }} kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }} - container_img: ["quay.io/pypa/manylinux2014_ppc64le"] + container_img: ["quay.io/pypa/manylinux_2_28_ppc64le"] timeout-minutes: 45 name: Kokkos core (${{ matrix.exec_model }}::${{ matrix.arch }}) runs-on: ${{ matrix.os }} @@ -91,7 +91,7 @@ jobs: cibw_build: ${{fromJson(needs.set_wheel_build_matrix.outputs.python_version)}} exec_model: ${{ fromJson(needs.set_wheel_build_matrix.outputs.exec_model) }} kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }} - container_img: ["quay.io/pypa/manylinux2014_ppc64le"] + container_img: ["quay.io/pypa/manylinux_2_28_ppc64le"] timeout-minutes: 45 name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{"cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11", "cp312-*":"3.12"}')[matrix.cibw_build] }}) runs-on: ${{ matrix.os }} @@ -134,7 +134,7 @@ jobs: CIBW_ENVIRONMENT: PL_BACKEND="${{ matrix.pl_backend }}" CMAKE_ARGS="-DENABLE_LAPACK=OFF" - CIBW_MANYLINUX_PPC64LE_IMAGE: manylinux2014 + CIBW_MANYLINUX_PPC64LE_IMAGE: manylinux_2_28 CIBW_BUILD_VERBOSITY: 3 diff --git a/.github/workflows/wheel_linux_x86_64.yml b/.github/workflows/wheel_linux_x86_64.yml index b84a01e67..664685b0b 100644 --- a/.github/workflows/wheel_linux_x86_64.yml +++ b/.github/workflows/wheel_linux_x86_64.yml @@ -6,7 +6,7 @@ name: Wheel::Linux::x86_64 # **Who does it impact**: Wheels to be uploaded to PyPI. env: - GCC_VERSION: 11 + GCC_VERSION: 13 on: pull_request: @@ -44,7 +44,7 @@ jobs: matrix: exec_model: ${{ fromJson(needs.set_wheel_build_matrix.outputs.exec_model) }} kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }} - container_img: ["quay.io/pypa/manylinux2014_x86_64"] + container_img: ["quay.io/pypa/manylinux_2_28_x86_64"] timeout-minutes: 30 name: Kokkos core (${{ matrix.exec_model }}) runs-on: ${{ needs.determine_runner.outputs.runner_group }} @@ -62,12 +62,12 @@ jobs: if: ${{ (matrix.container_img == 'ubuntu-latest') && (steps.kokkos-cache.outputs.cache-hit != 'true') }} run: | apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y -q install cmake gcc-$GCC_VERSION g++-$GCC_VERSION ninja-build git - echo "COMPILER=g++-11" >> $GITHUB_ENV + echo "COMPILER=g++-13" >> $GITHUB_ENV - - name: Install dependencies (CentOS) - if: ${{ (matrix.container_img == 'quay.io/pypa/manylinux2014_x86_64') && (steps.kokkos-cache.outputs.cache-hit != 'true') }} + - name: Install dependencies (AlmaLinux) + if: ${{ (matrix.container_img == 'quay.io/pypa/manylinux_2_28_x86_64') && (steps.kokkos-cache.outputs.cache-hit != 'true') }} run: | - yum update -y && yum install -y cmake ninja-build + dnf update -y && dnf install -y cmake ninja-build echo "COMPILER=g++" >> $GITHUB_ENV - name: Clone Kokkos libs @@ -104,11 +104,13 @@ jobs: cibw_build: ${{ fromJson(needs.set_wheel_build_matrix.outputs.python_version) }} exec_model: ${{ fromJson(needs.set_wheel_build_matrix.outputs.exec_model) }} kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }} - container_img: ["quay.io/pypa/manylinux2014_x86_64"] + container_img: ["quay.io/pypa/manylinux_2_28_x86_64"] timeout-minutes: 30 name: Linux::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11","cp312-*":"3.12" }')[matrix.cibw_build] }}) runs-on: ${{ needs.determine_runner.outputs.runner_group }} - container: ${{ matrix.container_img }} + container: + image: ${{ matrix.container_img }} + options: --privileged steps: - name: Restoring cached dependencies @@ -127,18 +129,18 @@ jobs: mkdir Kokkos cp -rf /root/Kokkos_install/${{ matrix.exec_model }}/* Kokkos/ - - name: Install dependencies (CentOS) - if: ${{ (matrix.container_img == 'quay.io/pypa/manylinux2014_x86_64') }} + - name: Install dependencies (AlmaLinux) + if: ${{ (matrix.container_img == 'quay.io/pypa/manylinux_2_28_x86_64') }} run: | - # Reduce wait time for repos not responding - cat /etc/yum.conf | sed "s/\[main\]/\[main\]\ntimeout=5/g" > /etc/yum.conf - yum update -y && yum install -y docker + dnf update -y && dnf install -y podman - name: Install cibuildwheel run: python3.9 -m pip install cibuildwheel~=2.16.0 - name: Build wheels env: + CIBW_CONTAINER_ENGINE: "podman" + CIBW_ARCHS_LINUX: ${{matrix.arch}} CIBW_BUILD: ${{ matrix.cibw_build }} @@ -147,15 +149,15 @@ jobs: # Python build settings CIBW_BEFORE_BUILD: | - cat /etc/yum.conf | sed "s/\[main\]/\[main\]\ntimeout=5/g" > /etc/yum.conf + cat /etc/dnf.conf | sed "s/\[main\]/\[main\]\ntimeout=5/g" > /etc/dnf.conf python -m pip install ninja cmake~=3.24.0 scipy - yum clean all -y - yum install centos-release-scl-rh -y - yum install devtoolset-11-gcc-c++ -y - source /opt/rh/devtoolset-11/enable -y + dnf clean all -y + dnf install gcc-toolset-13 -y + source /opt/rh/gcc-toolset-13/enable -y + PATH="/opt/rh/gcc-toolset-13/root/usr/bin:$PATH" CIBW_ENVIRONMENT: | - PATH="/opt/rh/devtoolset-11/root/usr/bin:$PATH" \ + PATH="/opt/rh/gcc-toolset-13/root/usr/bin:$PATH" \ PL_BACKEND="${{ matrix.pl_backend }}" CIBW_BEFORE_TEST: | @@ -166,7 +168,7 @@ jobs: DEVICENAME=`echo ${{ matrix.pl_backend }} | sed "s/_/./g"` pl-device-test --device=${DEVICENAME} --skip-ops -x --tb=short --no-flaky-report - CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 + CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 CIBW_BUILD_VERBOSITY: 3 diff --git a/.github/workflows/wheel_linux_x86_64_cuda.yml b/.github/workflows/wheel_linux_x86_64_cuda.yml index aa1671fd7..a12173daa 100644 --- a/.github/workflows/wheel_linux_x86_64_cuda.yml +++ b/.github/workflows/wheel_linux_x86_64_cuda.yml @@ -6,7 +6,7 @@ name: Wheel::Linux::x86_64::CUDA # **Who does it impact**: Wheels to be uploaded to PyPI. env: - GCC_VERSION: "11" + GCC_VERSION: 12 on: pull_request: @@ -48,28 +48,30 @@ jobs: pl_backend: ["lightning_gpu"] cuda_version: ["12"] cibw_build: ${{ fromJson(needs.set_wheel_build_matrix.outputs.python_version) }} - container_img: ["quay.io/pypa/manylinux2014_x86_64"] + container_img: ["quay.io/pypa/manylinux_2_28_x86_64"] timeout-minutes: 30 name: Linux::${{ matrix.arch }} - ${{ matrix.pl_backend }} CUDA ${{ matrix.cuda_version }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11","cp312-*":"3.12" }')[matrix.cibw_build] }}) runs-on: ${{ needs.determine_runner.outputs.runner_group }} - container: ${{ matrix.container_img }} + container: + image: ${{ matrix.container_img }} + options: --privileged steps: - name: Checkout PennyLane-Lightning uses: actions/checkout@v3 - - name: Install dependencies (CentOS) - if: ${{ (matrix.container_img == 'quay.io/pypa/manylinux2014_x86_64') }} + - name: Install dependencies (AlmaLinux) + if: ${{ (matrix.container_img == 'quay.io/pypa/manylinux_2_28_x86_64') }} run: | - # Reduce wait time for repos not responding - cat /etc/yum.conf | sed "s/\[main\]/\[main\]\ntimeout=5/g" > /etc/yum.conf - yum update -y && yum install -y docker + dnf update -y && dnf install -y podman - name: Install cibuildwheel run: python3.9 -m pip install cibuildwheel~=2.16.0 - name: Build wheels env: + CIBW_CONTAINER_ENGINE: "podman" + CIBW_ARCHS_LINUX: ${{ matrix.arch }} CIBW_BUILD: ${{ matrix.cibw_build }} @@ -80,25 +82,23 @@ jobs: # Python build settings CIBW_BEFORE_BUILD: | - cat /etc/yum.conf | sed "s/\[main\]/\[main\]\ntimeout=5/g" > /etc/yum.conf python -m pip install ninja cmake~=3.24.3 auditwheel~=5.0 custatevec-cu${{ matrix.cuda_version }} scipy - yum clean all -y - yum install centos-release-scl-rh -y - yum install devtoolset-11-gcc-c++ -y - source /opt/rh/devtoolset-11/enable -y - yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo -y - yum -y install cuda-${{ matrix.cuda_version }}-0 git openssh wget + dnf clean all -y + dnf install gcc-toolset-12 dnf-utils -y + source /opt/rh/gcc-toolset-12/enable -y + yum-config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo -y + dnf -y install cuda-${{ matrix.cuda_version }}-0 git openssh wget # ensure nvcc is available CIBW_ENVIRONMENT: | - PATH=/opt/rh/devtoolset-11/root/usr/bin:$PATH:/usr/local/cuda-${{ matrix.cuda_version }}/bin \ - LD_LIBRARY_PATH=/opt/rh/devtoolset-11/root/usr/lib64:/opt/rh/devtoolset-11/root/usr/lib:/opt/rh/devtoolset-11/root/usr/lib64/dyninst:/opt/rh/devtoolset-11/root/usr/lib/dyninst:$LD_LIBRARY_PATH:/usr/local/cuda-${{ matrix.cuda_version }}/lib64 \ + PATH=/opt/rh/gcc-toolset-12/root/usr/bin:$PATH:/usr/local/cuda-${{ matrix.cuda_version }}/bin \ + LD_LIBRARY_PATH=/opt/rh/gcc-toolset-12/root/usr/lib64:/opt/rh/gcc-toolset-12/root/usr/lib:/opt/rh/gcc-toolset-12/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-12/root/usr/lib/dyninst:$LD_LIBRARY_PATH:/usr/local/cuda-${{ matrix.cuda_version }}/lib64 \ PL_BACKEND="${{ matrix.pl_backend }}" \ - PKG_CONFIG_PATH=/opt/rh/devtoolset-11/root/usr/lib64/pkgconfig:$PKG_CONFIG_PATH + PKG_CONFIG_PATH=/opt/rh/gcc-toolset-12/root/usr/lib64/pkgconfig:$PKG_CONFIG_PATH CIBW_REPAIR_WHEEL_COMMAND_LINUX: "./bin/auditwheel repair -w {dest_dir} {wheel}" - CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 + CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 CIBW_BUILD_VERBOSITY: 3 diff --git a/pennylane_lightning/core/_version.py b/pennylane_lightning/core/_version.py index cd1f98d17..7cad190a0 100644 --- a/pennylane_lightning/core/_version.py +++ b/pennylane_lightning/core/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.37.0-dev0" +__version__ = "0.37.0-dev1"