Skip to content

Build and upload LGPU wheels for Linux aarch64 #4

Build and upload LGPU wheels for Linux aarch64

Build and upload LGPU wheels for Linux aarch64 #4

name: Wheel::Linux::ARM::CUDA
# **What it does**: Builds lightning.gpu and lightning.tensor python wheels for
# architecture ARM 64 and store it as artifacts.
# Python versions: 3.9, 3.10, 3.11, 3.12.
# **Why we have it**: To build wheels for pennylane-lightning installation.
# **Who does it impact**: Wheels to be uploaded to PyPI.
on:
pull_request:
push:
branches:
- master
release:
types: [published]
workflow_dispatch:
env:
MACOSX_DEPLOYMENT_TARGET: 14.0
concurrency:
group: wheel_linux_arm64-${{ github.ref }}
cancel-in-progress: true
jobs:
linux-wheels-arm64:
strategy:
fail-fast: false
max-parallel: 2
matrix:
python_version: [{major_minor: "3.9", patch: "19", package: "python39", alternative: "39"},
{major_minor: "3.10", patch: "14", package: "python3.10", alternative: "310"},
{major_minor: "3.11", patch: "9", package: "python3.11", alternative: "311"},
{major_minor: "3.12", patch: "3", package: "python3.12", alternative: "312"}]
container_img: ["quay.io/pypa/manylinux_2_28_aarch64"]
container_name: ["manylinux_2_28_aarch64"]
os: [manylinux]
arch: [arm64]
cuda_version: ["12"]
pl_backend: ["lightning_gpu"]
timeout-minutes: 60
name: Linux::${{ matrix.arch }} - ${{ matrix.pl_backend }} CUDA ${{ matrix.cuda_version }} Python ${{ matrix.python_version.major_minor }}
runs-on:
group: 'Office 24th floor M2 Mac'
steps:
- name: Checkout PennyLane-Lightning
uses: actions/checkout@v4
- name: Setup Runner Environment
id: setup_env
uses: ./.github/workflows/setup_macos_env_linux_arm64
with:
python_version: ${{ matrix.python_version.major_minor }}
- name: Build Wheel
run: |
set -x
export GCC_VERSION=13
docker run --rm --platform linux/aarch64 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/pennylane-lightning \
-i ${{ matrix.container_img }} \
bash /pennylane-lightning/.github/workflows/scripts/linux_arm64/rh8/build_lgpu.sh $GCC_VERSION ${{ matrix.python_version.major_minor }} ${{ matrix.python_version.patch }} ${{ matrix.python_version.package }} ${{ matrix.python_version.alternative }} ${{ matrix.cuda_version}}
- uses: actions-ecosystem/action-regex-match@main
id: rc_build
with:
text: ${{ github.event.pull_request.head.ref }}
regex: '.*[0-9]+.[0-9]+.[0-9]+[-_]?rc[0-9]+'
- name: Upload Wheel Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}-cu${{ matrix.cuda_version }}
path: wheel/