Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate aarch64-cuda-wheels tests #1031

Merged
merged 38 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
fb6b471
initial commit
multiphaseCFD Jan 6, 2025
e276801
Auto update version from '0.40.0-dev43' to '0.40.0-dev44'
ringo-but-quantum Jan 6, 2025
617d074
Trigger CIs
multiphaseCFD Jan 6, 2025
31f0860
Trigger CIs
multiphaseCFD Jan 6, 2025
f6e5fb2
lgpu tests
multiphaseCFD Jan 6, 2025
926cd36
update
multiphaseCFD Jan 6, 2025
0884cce
add cuda to path
multiphaseCFD Jan 7, 2025
178f3f7
test
multiphaseCFD Jan 7, 2025
8fbe885
install cuda
multiphaseCFD Jan 7, 2025
a3450d0
fix failure
multiphaseCFD Jan 7, 2025
179d2c9
test
multiphaseCFD Jan 7, 2025
34657db
GCC12-gcc13
multiphaseCFD Jan 7, 2025
f3d4167
test
multiphaseCFD Jan 7, 2025
e7b77aa
update
multiphaseCFD Jan 7, 2025
a44722b
fix typo
multiphaseCFD Jan 7, 2025
1e545c4
force reinstall
multiphaseCFD Jan 7, 2025
851ce6d
ensure cuquantum is installed before tests
multiphaseCFD Jan 7, 2025
bb0fb10
update
multiphaseCFD Jan 7, 2025
fd773f2
install cuquantum libs
multiphaseCFD Jan 7, 2025
1214b1e
install lightning.qubit for wheels testing
multiphaseCFD Jan 7, 2025
163af18
add nvjitlink to rpath
multiphaseCFD Jan 7, 2025
5bb7001
upload artifacts
multiphaseCFD Jan 7, 2025
b7fed03
install LQ
multiphaseCFD Jan 7, 2025
03fe448
install cuquantum sdk before wheels test
multiphaseCFD Jan 7, 2025
e3dae4b
fix cuquantum sdk dependencies conflicts
multiphaseCFD Jan 7, 2025
63078d7
install dependencies
multiphaseCFD Jan 7, 2025
d82ff6c
fix
multiphaseCFD Jan 7, 2025
9d06a42
skip lq compilations
multiphaseCFD Jan 7, 2025
0aa04b6
tidy up
multiphaseCFD Jan 7, 2025
2f22630
install LQ
multiphaseCFD Jan 7, 2025
eee60ca
revert verbo to 3
multiphaseCFD Jan 7, 2025
e883fe8
drop LQ for LT unit tests
multiphaseCFD Jan 7, 2025
f7191c7
update test cases
multiphaseCFD Jan 7, 2025
6c561c9
skip get_c_interface test
multiphaseCFD Jan 7, 2025
0eeede7
Merge branch 'v0.40.0_rc' into aarch64_gpu_wheels_tests
multiphaseCFD Jan 8, 2025
2f551a1
revert some changes
multiphaseCFD Jan 8, 2025
7406a7b
add changelog
multiphaseCFD Jan 8, 2025
107d16e
apply Ali's suggestions
multiphaseCFD Jan 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 35 additions & 19 deletions .github/workflows/wheel_linux_aarch64_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,28 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [pl-4-core-large-runner]
os: [arm-gpu]
arch: [aarch64]
pl_backend: ["lightning_gpu", "lightning_tensor"]
cuda_version: ["12"]
cibw_build: ${{ fromJson(needs.set_wheel_build_matrix.outputs.python_version) }}
container_img: ["quay.io/pypa/manylinux_2_28_aarch64"]
timeout-minutes: 45
name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp310-*":"3.10","cp311-*":"3.11", "cp312-*":"3.12" }')[matrix.cibw_build] }})
runs-on: ${{ matrix.os }}
runs-on:
- self-hosted
- ${{ matrix.os }}

steps:
- name: Checkout PennyLane-Lightning
uses: actions/checkout@v4

- name: Install Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install cibuildwheel
run: python3.10 -m pip install cibuildwheel~=2.20.0 tomlkit
run: python -m pip install cibuildwheel~=2.20.0 tomlkit
multiphaseCFD marked this conversation as resolved.
Show resolved Hide resolved

- name: Configure pyproject.toml file
run: PL_BACKEND="${{ matrix.pl_backend }}" python scripts/configure_pyproject_toml.py

- uses: docker/setup-qemu-action@v3
name: Set up QEMU

- name: Build wheels
env:
CIBW_ARCHS_LINUX: ${{matrix.arch}}
Expand Down Expand Up @@ -90,14 +84,36 @@ jobs:

CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28

CIBW_BUILD_VERBOSITY: 3
CIBW_BUILD_VERBOSITY: 1
multiphaseCFD marked this conversation as resolved.
Show resolved Hide resolved

run: python3 -m cibuildwheel --output-dir wheelhouse
run: python -m cibuildwheel --output-dir wheelhouse

- name: Determine Python version
id: pyvs
shell: bash
run: |
echo "version=$(echo ${{ matrix.cibw_build }} | tr -cd '[:digit:].' | sed 's/./&./1')" >> $GITHUB_OUTPUT

- uses: actions/setup-python@v5
name: Install Python
with:
python-version: ${{ steps.pyvs.outputs.version }}

- name: Test wheels
maliasadi marked this conversation as resolved.
Show resolved Hide resolved
run: |
python -m ensurepip --upgrade
python -m pip install setuptools
multiphaseCFD marked this conversation as resolved.
Show resolved Hide resolved
python -m pip install -r requirements-tests.txt
PL_BACKEND="lightning_qubit" python scripts/configure_pyproject_toml.py
python -m pip install . -vv
python -m pip install ./wheelhouse/*.whl
DEVICENAME=`echo ${{ matrix.pl_backend }} | sed "s/_/./g"`
PL_DEVICE=${DEVICENAME} python -m pytest tests/ -k "not test_native_mcm"
multiphaseCFD marked this conversation as resolved.
Show resolved Hide resolved

- name: Validate wheels
run: |
python3 -m pip install twine
python3 -m twine check ./wheelhouse/*.whl
python -m pip install twine
python -m twine check ./wheelhouse/*.whl

- uses: actions-ecosystem/action-regex-match@main
id: rc_build
Expand All @@ -106,10 +122,10 @@ jobs:
regex: '.*[0-9]+.[0-9]+.[0-9]+[-_]?rc[0-9]+'

- uses: actions/upload-artifact@v4
if: |
github.event_name == 'release' ||
github.event_name == 'workflow_dispatch' ||
github.ref == 'refs/heads/master'
#if: |
# github.event_name == 'release' ||
# github.event_name == 'workflow_dispatch' ||
# github.ref == 'refs/heads/master'
multiphaseCFD marked this conversation as resolved.
Show resolved Hide resolved
with:
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ fromJson('{ "cp310-*":"py310","cp311-*":"py311","cp312-*":"py312" }')[matrix.cibw_build] }}-${{ matrix.arch }}-cu${{ matrix.cuda_version }}.zip
path: ./wheelhouse/*.whl
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ if(ENABLE_PYTHON)
if("${PL_BACKEND}" STREQUAL "lightning_gpu" OR "${PL_BACKEND}" STREQUAL "lightning_tensor")
# Allow pip installation of cuQuantum & CUDA 12 libs to be accessible without setting LD_LIBRARY_PATH for lightning_gpu
# BUILD_RPATH only works for the last call
set_target_properties("${PL_BACKEND}_ops" PROPERTIES BUILD_RPATH "$ORIGIN/../cuquantum/lib:$ORIGIN/../nvidia/cuda_runtime/lib:$ORIGIN/../nvidia/cublas/lib:$ORIGIN/../nvidia/cusparse/lib:${SCIPY_OPENBLAS32_RUNTIME_LIB_PATH}:$ORIGIN")
set_target_properties("${PL_BACKEND}_ops" PROPERTIES BUILD_RPATH "$ORIGIN/../cuquantum/lib:$ORIGIN/../nvidia/cuda_runtime/lib:$ORIGIN/../nvidia/nvjitlink/lib:$ORIGIN/../nvidia/cublas/lib:$ORIGIN/../nvidia/cusparse/lib:${SCIPY_OPENBLAS32_RUNTIME_LIB_PATH}:$ORIGIN")
multiphaseCFD marked this conversation as resolved.
Show resolved Hide resolved
else()
set_target_properties("${PL_BACKEND}_ops" PROPERTIES BUILD_RPATH "${SCIPY_OPENBLAS32_RUNTIME_LIB_PATH}")
endif()
Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/core/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
Version number (major.minor.patch[-label])
"""

__version__ = "0.40.0-dev43"
__version__ = "0.40.0-dev44"
Loading