Skip to content

Commit

Permalink
Build wheels in the Release mode (#903)
Browse files Browse the repository at this point in the history
### Before submitting

Please complete the following checklist when submitting a PR:

- [ ] All new features must include a unit test.
If you've fixed a bug or added code that should be tested, add a test to
the
      [`tests`](../tests) directory!

- [ ] All new functions and code must be clearly commented and
documented.
If you do make documentation changes, make sure that the docs build and
      render correctly by running `make docs`.

- [ ] Ensure that the test suite passes, by running `make test`.

- [ ] Add a new entry to the `.github/CHANGELOG.md` file, summarizing
the
      change, and including a link back to the PR.

- [ ] Ensure that code is properly formatted by running `make format`. 

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


------------------------------------------------------------------------------------------------------------

**Context:**
Build Lightning wheels in Release mode. 


**Description of the Change:**

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**
[sc-73504]

---------

Co-authored-by: ringo-but-quantum <[email protected]>
  • Loading branch information
maliasadi and ringo-but-quantum authored Sep 12, 2024
1 parent d4a90d3 commit 1b570e0
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 17 deletions.
15 changes: 9 additions & 6 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
* Skip the compilation of Lightning simulators and development requirements to boost the build of public docs up to 5x.
[(#904)](https://github.com/PennyLaneAI/pennylane-lightning/pull/904)

* Build Lightning wheels in `Release` mode.
[(#903)](https://github.com/PennyLaneAI/pennylane-lightning/pull/903)

* Update Pybind11 to 2.13.5.
[(#901)](https://github.com/PennyLaneAI/pennylane-lightning/pull/901)

* Migrate wheels artifacts to v4.
[(#893)](https://github.com/PennyLaneAI/pennylane-lightning/pull/893)

* Prefer `tomlkit` over `toml` for building Lightning wheels, and choose `tomli` and `tomllib` over `toml` when installing the package.
[(#857)](https://github.com/PennyLaneAI/pennylane-lightning/pull/857)

* Update GitHub actions in response to a high-severity vulnerability.
[(#887)](https://github.com/PennyLaneAI/pennylane-lightning/pull/887)

Expand All @@ -52,12 +52,15 @@
* Optimize gate cache recording for `lightning.tensor` C++ layer.
[(#879)](https://github.com/PennyLaneAI/pennylane-lightning/pull/879)

* Unify Lightning-Kokkos device and Lightning-Qubit device under a Lightning Base device.
[(#876)](https://github.com/PennyLaneAI/pennylane-lightning/pull/876)

* Smarter defaults for the `split_obs` argument in the serializer. The serializer splits linear combinations into chunks instead of all their terms.
[(#873)](https://github.com/PennyLaneAI/pennylane-lightning/pull/873/)

* Unify Lightning-Kokkos device and Lightning-Qubit device under a Lightning Base device.
[(#876)](https://github.com/PennyLaneAI/pennylane-lightning/pull/876)
* Prefer `tomlkit` over `toml` for building Lightning wheels, and choose `tomli` and `tomllib` over `toml` when installing the package.
[(#857)](https://github.com/PennyLaneAI/pennylane-lightning/pull/857)

* LightningKokkos gains native support for the `PauliRot` gate.
[(#855)](https://github.com/PennyLaneAI/pennylane-lightning/pull/855)

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/wheel_linux_aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ jobs:
cat /etc/yum.conf | sed "s/\[main\]/\[main\]\ntimeout=5/g" > /etc/yum.conf
python -m pip install ninja cmake~=3.27.0
CIBW_ENVIRONMENT: CMAKE_ARGS="-DENABLE_LAPACK=OFF"
CIBW_ENVIRONMENT: |
CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release"
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheel_linux_aarch64_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
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 \
PKG_CONFIG_PATH=/opt/rh/gcc-toolset-12/root/usr/lib64/pkgconfig:$PKG_CONFIG_PATH \
CMAKE_ARGS="-DENABLE_LAPACK=OFF"
CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release"
CIBW_REPAIR_WHEEL_COMMAND_LINUX: "./bin/auditwheel repair -w {dest_dir} {wheel}"

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/wheel_linux_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ jobs:
source /opt/rh/gcc-toolset-13/enable -y
PATH="/opt/rh/gcc-toolset-13/root/usr/bin:$PATH"
CIBW_ENVIRONMENT: PATH="/opt/rh/gcc-toolset-13/root/usr/bin:$PATH"
CIBW_ENVIRONMENT: |
PATH="/opt/rh/gcc-toolset-13/root/usr/bin:$PATH" CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release"
CIBW_BEFORE_TEST: |
python -m pip install -r requirements-tests.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheel_linux_x86_64_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
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 \
PKG_CONFIG_PATH=/opt/rh/gcc-toolset-12/root/usr/lib64/pkgconfig:$PKG_CONFIG_PATH \
CMAKE_ARGS="-DENABLE_LAPACK=OFF"
CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release"
CIBW_REPAIR_WHEEL_COMMAND_LINUX: "./bin/auditwheel repair -w {dest_dir} {wheel}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheel_macos_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
python -m pip install pybind11 ninja cmake~=3.27.0 setuptools scipy
CIBW_ENVIRONMENT: |
CMAKE_ARGS="-DCMAKE_CXX_COMPILER_TARGET=arm64-apple-macos11 -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_SYSTEM_PROCESSOR=ARM64 -DENABLE_OPENMP=OFF"
CMAKE_ARGS="-DCMAKE_CXX_COMPILER_TARGET=arm64-apple-macos11 -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_SYSTEM_PROCESSOR=ARM64 -DENABLE_OPENMP=OFF -DCMAKE_BUILD_TYPE=Release"
CIBW_BEFORE_TEST: |
python -m pip install -r requirements-tests.txt
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/wheel_macos_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ jobs:
CIBW_BEFORE_BUILD: |
python -m pip install pybind11 ninja cmake~=3.27.0 setuptools scipy
CIBW_ENVIRONMENT: |
CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release"
PL_BACKEND: ${{ matrix.pl_backend }}

CIBW_BEFORE_TEST: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/wheel_win_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
uses: actions/cache@v4
with:
path: D:\a\install_dir\${{ matrix.exec_model }}
key: ${{ matrix.os }}-kokkos${{ matrix.kokkos_version }}-${{ matrix.exec_model }}-RelWithDebInfo
key: ${{ matrix.os }}-kokkos${{ matrix.kokkos_version }}-${{ matrix.exec_model }}-Release

- name: Clone Kokkos libs
if: steps.kokkos-cache.outputs.cache-hit != 'true'
Expand All @@ -80,10 +80,10 @@ jobs:
-DKokkos_ENABLE_DEPRECATION_WARNINGS=OFF `
-DCMAKE_CXX_STANDARD=20 `
-DCMAKE_POSITION_INDEPENDENT_CODE=ON `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_BUILD_TYPE=Release `
-T clangcl
cmake --build ./Build --config RelWithDebInfo --verbose
cmake --install ./Build --config RelWithDebInfo --verbose
cmake --build ./Build --config Release --verbose
cmake --install ./Build --config Release --verbose
win-wheels:
needs: [set_wheel_build_matrix, build_dependencies]
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
python -m pip install pybind11 cmake~=3.27.0 build
CIBW_ENVIRONMENT: |
CMAKE_ARGS="-DENABLE_LAPACK=OFF"
CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014

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.39.0-dev22"
__version__ = "0.39.0-dev23"

0 comments on commit 1b570e0

Please sign in to comment.