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

Fix Windows wheels #693

Merged
merged 50 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
b15aeaf
Merge branch 'master' of https://github.com/PennyLaneAI/pennylane-lig…
AmintorDusko Mar 18, 2024
65c8853
Merge branch 'master' of https://github.com/PennyLaneAI/pennylane-lig…
AmintorDusko Mar 19, 2024
ebeb417
Merge branch 'master' of https://github.com/PennyLaneAI/pennylane-lig…
AmintorDusko Mar 19, 2024
d664fd2
Merge branch 'master' of https://github.com/PennyLaneAI/pennylane-lig…
AmintorDusko Mar 21, 2024
87ed3ff
Merge branch 'master' of https://github.com/PennyLaneAI/pennylane-lig…
AmintorDusko Mar 22, 2024
1630300
Merge branch 'master' of https://github.com/PennyLaneAI/pennylane-lig…
AmintorDusko Mar 25, 2024
ed322c4
Merge branch 'master' of https://github.com/PennyLaneAI/pennylane-lig…
AmintorDusko Mar 27, 2024
594f386
Merge branch 'master' of https://github.com/PennyLaneAI/pennylane-lig…
AmintorDusko Apr 1, 2024
c9c3817
Merge branch 'master' of https://github.com/PennyLaneAI/pennylane-lig…
AmintorDusko Apr 4, 2024
0762cb1
Merge branch 'master' of https://github.com/PennyLaneAI/pennylane-lig…
AmintorDusko Apr 15, 2024
d7c60b0
Merge branch 'master' of https://github.com/PennyLaneAI/pennylane-lig…
AmintorDusko Apr 22, 2024
75c14af
move tests after patching wheels
AmintorDusko Apr 22, 2024
1edba4a
Auto update version from '0.36.0-dev33' to '0.36.0-dev34'
ringo-but-quantum Apr 22, 2024
3422fbc
Trigger CIs
AmintorDusko Apr 22, 2024
2e1ec4b
Merge branch 'master' into fix_Windows_wheels
AmintorDusko Apr 22, 2024
bb23adc
Merge branch 'fix_Windows_wheels' of https://github.com/PennyLaneAI/p…
AmintorDusko Apr 22, 2024
e87eedf
Auto update version from '0.36.0-dev34' to '0.36.0-dev35'
ringo-but-quantum Apr 22, 2024
11bff6c
fix Kokkos caching and job dependencies
AmintorDusko Apr 22, 2024
950b6e4
fix backend wheel
AmintorDusko Apr 22, 2024
10bac1e
Merge branch 'fix_Windows_wheels' of https://github.com/PennyLaneAI/p…
AmintorDusko Apr 22, 2024
e0df3fb
Set proper git version
AmintorDusko Apr 22, 2024
4da4f3a
change pip 22 delivery
AmintorDusko Apr 22, 2024
5f2376c
ensure pip and setuptools
AmintorDusko Apr 22, 2024
23a8b0c
fix pip call
AmintorDusko Apr 22, 2024
4b34d64
test updated pip
AmintorDusko Apr 22, 2024
b1ff784
remove building lightning_kokkos wheels
AmintorDusko Apr 22, 2024
7386349
remove build LKokkos wheels for Win. This time right.
AmintorDusko Apr 22, 2024
6370bcc
Fix LK tests
vincentmr Apr 22, 2024
a54d8a6
Revert wheel_win trigger
vincentmr Apr 22, 2024
42ee145
Auto update version from '0.36.0-dev35' to '0.36.0-dev36'
ringo-but-quantum Apr 22, 2024
3800b1c
Fix SKIP_COMPILATION=True
vincentmr Apr 22, 2024
c762242
Merge branch 'master' into fix_Windows_wheels
vincentmr Apr 22, 2024
cde7b7f
Fix parantheses.
vincentmr Apr 22, 2024
414b511
Install LQ with python
vincentmr Apr 22, 2024
999fd82
Revert to Amintor's minus merge from master.
vincentmr Apr 22, 2024
505bb39
update changelog
AmintorDusko Apr 23, 2024
d7e1fdf
Merge branch 'fix_Windows_wheels' of https://github.com/PennyLaneAI/p…
AmintorDusko Apr 23, 2024
60b10b9
Merge branch 'master' of https://github.com/PennyLaneAI/pennylane-lig…
AmintorDusko Apr 23, 2024
0ebd21d
Merge branch 'master' into fix_Windows_wheels
AmintorDusko Apr 23, 2024
d9e26f1
Auto update version from '0.36.0-dev35' to '0.36.0-dev36'
ringo-but-quantum Apr 23, 2024
272638c
Merge branch 'master' into fix_Windows_wheels
vincentmr Apr 23, 2024
f5473e6
Apply suggestions from code review
maliasadi Apr 23, 2024
7a6f71d
Merge branch 'fix_Windows_wheels' of https://github.com/PennyLaneAI/p…
AmintorDusko Apr 23, 2024
fa09224
trigger CIs
AmintorDusko Apr 23, 2024
00b19ee
fix crazy merge
AmintorDusko Apr 23, 2024
6308572
Merge branch 'master' into fix_Windows_wheels
AmintorDusko Apr 24, 2024
a64fd16
Auto update version from '0.36.0-dev36' to '0.36.0-dev37'
ringo-but-quantum Apr 24, 2024
0df07f5
Merge branch 'fix_Windows_wheels' of https://github.com/PennyLaneAI/p…
AmintorDusko Apr 24, 2024
cb65cd6
trigger CIs
AmintorDusko Apr 24, 2024
b4cb4c0
Trigger CIs
AmintorDusko Apr 24, 2024
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
6 changes: 6 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,14 @@
* Introduce `ci:build_wheels` label, which controls wheel building on `pull_request` and other triggers.
[(#648)](https://github.com/PennyLaneAI/pennylane-lightning/pull/648)

* Remove building wheels for Lightning Kokkos on Windows.
[(#693)](https://github.com/PennyLaneAI/pennylane-lightning/pull/693)

### Improvements

* Add tests for Windows Wheels, fix ill-defined caching, and set the proper backend for LKokkos wheels.
[(#693)](https://github.com/PennyLaneAI/pennylane-lightning/pull/693)

* Replace string comparisons by `isinstance` checks where possible.
[(#691)](https://github.com/PennyLaneAI/pennylane-lightning/pull/691)

Expand Down
59 changes: 40 additions & 19 deletions .github/workflows/wheel_win_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-2022]
exec_model: [\"SERIAL\"]
exec_model: ["SERIAL"]
kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }}
timeout-minutes: 30
name: Kokkos core (${{ matrix.exec_model }})
Expand All @@ -59,12 +59,6 @@ jobs:
cd D:\a
git clone --branch ${{ matrix.kokkos_version }} https://github.com/kokkos/kokkos.git

- name: Create installation directory
if: steps.kokkos-cache.outputs.cache-hit != 'true'
run: |
Remove-Item -Path D:\a\install_dir\${{ matrix.exec_model }} -Recurse -Force -ErrorAction Ignore
mkdir -p D:\a\install_dir\${{ matrix.exec_model }}

- name: Install dependencies
if: steps.kokkos-cache.outputs.cache-hit != 'true'
run: |
Expand All @@ -73,6 +67,7 @@ jobs:
- name: Build Kokkos core library
if: steps.kokkos-cache.outputs.cache-hit != 'true'
run: |
mkdir -p D:\a\install_dir\${{ matrix.exec_model }}
cd D:\a\kokkos
cmake -BBuild . -DCMAKE_INSTALL_PREFIX=D:\a\install_dir\${{ matrix.exec_model }} `
-DKokkos_ENABLE_COMPLEX_ALIGN=OFF `
Expand All @@ -87,15 +82,15 @@ jobs:
cmake --install ./Build --config RelWithDebInfo --verbose

win-wheels:
needs: [set_wheel_build_matrix]
needs: [set_wheel_build_matrix, build_dependencies]
strategy:
fail-fast: false
matrix:
os: [windows-2022]
arch: [AMD64]
pl_backend: ["lightning_kokkos", "lightning_qubit"]
pl_backend: ["lightning_qubit"]
cibw_build: ${{ fromJson(needs.set_wheel_build_matrix.outputs.python_version) }}
exec_model: [\"SERIAL\"]
exec_model: ["SERIAL"]
kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }}
timeout-minutes: 30
name: ${{ matrix.os }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11","cp312-*":"3.12" }')[matrix.cibw_build] }})
Expand All @@ -112,11 +107,11 @@ jobs:
- name: Checkout PennyLane-Lightning
uses: actions/checkout@v4

- name: Copy cached libraries #Update when merging to pennylane-lightning
- name: Copy cached libraries
if: steps.kokkos-cache.outputs.cache-hit == 'true'
run: |
Copy-Item -Path "D:\a\install_dir\${{ matrix.exec_model }}\" `
-Destination "D:\a\Lightning-Unification\Lightning-Unification\Kokkos" -Recurse -Force
-Destination "D:\a\pennylane-lightning\pennylane-lightning\Kokkos" -Recurse -Force
AmintorDusko marked this conversation as resolved.
Show resolved Hide resolved

- name: Install cibuildwheel
run: python -m pip install cibuildwheel~=2.16.0 wheel
Expand All @@ -131,12 +126,8 @@ jobs:
CIBW_BEFORE_BUILD: |
python -m pip install pybind11 cmake~=3.24.0 build

#Temporarily commenting while solving problems to find binaries in CIBW tests.
# CIBW_BEFORE_TEST: |
# python -m pip install -r requirements-tests.txt

# CIBW_TEST_COMMAND: |
# pl-device-test --device=lightning.qubit --skip-ops -x --tb=short --no-flaky-report
CIBW_ENVIRONMENT: |
PL_BACKEND="${{ matrix.pl_backend }}"

CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014

Expand Down Expand Up @@ -164,6 +155,36 @@ jobs:
}
cd ..

- 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
run: |
python -m ensurepip --upgrade
python -m pip install setuptools
python -m pip install -r requirements-tests.txt
if ('${{ matrix.pl_backend }}' -eq 'lightning_kokkos'){
$SKIP_COMPILATION=true
$PL_BACKEND="lightning_qubit"
python -m pip install -e . -vv
AmintorDusko marked this conversation as resolved.
Show resolved Hide resolved
}
cd wheelhouse
maliasadi marked this conversation as resolved.
Show resolved Hide resolved
$wheels = Get-ChildItem "./" -Filter *.whl
foreach ($i in $wheels){
python -m pip install $i.Name
}
cd ..
maliasadi marked this conversation as resolved.
Show resolved Hide resolved
$DEVICENAME=(echo ${{ matrix.pl_backend }} | %{$_ -replace "_","."})
pl-device-test --device=$DEVICENAME --skip-ops -x --tb=short --no-flaky-report

- name: Validate wheels
run: |
python -m pip install twine
Expand Down Expand Up @@ -207,4 +228,4 @@ jobs:
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/
maliasadi marked this conversation as resolved.
Show resolved Hide resolved
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.36.0-dev35"
__version__ = "0.36.0-dev36"
Loading