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 37 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
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@

### Improvements

* Add CI wheels checks for `aarch64` wheels of Lightning-GPU and Lightning-Tensor.
[(#1031)](https://github.com/PennyLaneAI/pennylane-lightning/pull/1031/)
multiphaseCFD marked this conversation as resolved.
Show resolved Hide resolved

* Replace the `dummy_tensor_update` method with the `cutensornetStateCaptureMPS`API to ensure that further gates apply is allowed after the `cutensornetStateCompute` call.
[(#1028)](https://github.com/PennyLaneAI/pennylane-lightning/pull/1028/)
multiphaseCFD marked this conversation as resolved.
Show resolved Hide resolved

Expand Down
38 changes: 33 additions & 5 deletions .github/workflows/wheel_linux_aarch64_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,17 @@ 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
Expand All @@ -59,9 +61,6 @@ jobs:
- 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 @@ -94,6 +93,35 @@ jobs:

run: python3 -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
SKIP_COMPILATION=True python -m pip install . -vv
python -m pip install ./wheelhouse/*.whl
DEVICENAME=`echo ${{ matrix.pl_backend }} | sed "s/_/./g"`
if (${{ matrix.pl_backend == 'lightning_tensor' }}) then
PL_DEVICE=${DEVICENAME} python -m pytest tests/
else
pl-device-test --device=${DEVICENAME} --skip-ops -x --tb=short --no-flaky-report
# MCM tests are slow and skipped. get_c_interface() API is not supported with current test setup and skipped.
PL_DEVICE=${DEVICENAME} python -m pytest tests/ -k "not test_supported_linux_platform_gpu and not test_native_mcm"
fi


- name: Validate wheels
run: |
python3 -m pip install twine
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-rc0"
__version__ = "0.40.0-rc1"
4 changes: 2 additions & 2 deletions tests/lightning_tensor/test_measurements_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def test_probs_many_wires(self, method, n_qubits, n_targets, tol):
pytest.skip("Number of targets cannot exceed the number of wires.")

dev = qml.device(device_name, wires=n_qubits, **method)
dq = qml.device("lightning.qubit", wires=n_qubits)
dq = qml.device("default.qubit", wires=n_qubits)

init_state = np.random.rand(2**n_qubits) + 1.0j * np.random.rand(2**n_qubits)
init_state /= np.linalg.norm(init_state)
Expand Down Expand Up @@ -168,7 +168,7 @@ def test_state_many_wires(self, method, n_qubits, n_targets, tol):
pytest.skip("Number of targets cannot exceed the number of wires.")

dev = qml.device(device_name, wires=n_qubits, **method)
dq = qml.device("lightning.qubit", wires=n_qubits)
dq = qml.device("default.qubit", wires=n_qubits)

init_state = np.random.rand(2**n_qubits) + 1.0j * np.random.rand(2**n_qubits)
init_state /= np.linalg.norm(init_state)
Expand Down
Loading