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

Add dynamic openblas/lapack loading for win32 #666

Draft
wants to merge 498 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
498 commits
Select commit Hold shift + click to select a range
e1a1c68
Merge branch 'master' into lightning-qubit2-add-shots
vincentmr Mar 18, 2024
70c5494
Auto update version
github-actions[bot] Mar 18, 2024
cff6f25
Merge branch 'lightning-qubit2-add-shots' of https://github.com/Penny…
AmintorDusko Mar 19, 2024
65c8853
Merge branch 'master' of https://github.com/PennyLaneAI/pennylane-lig…
AmintorDusko Mar 19, 2024
e8f65db
Merge branch 'lightning-qubit2-add-shots' into lightning-qubit-new-api
AmintorDusko Mar 19, 2024
4a2aaa2
Merge branch 'master' into lightning-qubit-new-api
AmintorDusko Mar 19, 2024
f91a1d8
comment isort check
AmintorDusko Mar 19, 2024
c52fd10
trigger ci
vincentmr Mar 19, 2024
4873022
Update tests/test_expval.py
vincentmr Mar 19, 2024
3481ef2
Init mcmc params to None in measurements.
vincentmr Mar 19, 2024
cad382a
Reformat with python3.11
vincentmr Mar 19, 2024
c175572
Reformat black
vincentmr Mar 19, 2024
ebeb417
Merge branch 'master' of https://github.com/PennyLaneAI/pennylane-lig…
AmintorDusko Mar 19, 2024
0f83b9f
Merge branch 'lightning-qubit2-add-shots' of https://github.com/Penny…
AmintorDusko Mar 19, 2024
7731a75
Merge branch 'lightning-qubit2-add-shots' into lightning-qubit-new-api
AmintorDusko Mar 19, 2024
37e1e58
Merge branch 'master' into lightning-qubit-new-api
AmintorDusko Mar 19, 2024
16d019e
Auto update version
github-actions[bot] Mar 19, 2024
0c8ffc4
Merge branch 'lightning-qubit-new-api' of https://github.com/PennyLan…
AmintorDusko Mar 19, 2024
2cf45e9
update QuantumScriptSerializer
AmintorDusko Mar 19, 2024
f63d6af
remove LightningQubit2 from init
AmintorDusko Mar 19, 2024
080d037
update setup.py
AmintorDusko Mar 19, 2024
c5442a6
remove lightning.qubit2 from tests configuration
AmintorDusko Mar 19, 2024
83bf167
remove extra tests for lightning.qubit2
AmintorDusko Mar 19, 2024
3d831d0
migrate lightning.qubit2 to lightning.qubit on tests
AmintorDusko Mar 19, 2024
c30f94f
make lightning.qubit2 the new lightning.qubit
AmintorDusko Mar 19, 2024
d557b65
add device name (necessary for pl-device-test)
AmintorDusko Mar 19, 2024
472e0ff
Add _measure_hamiltonian_with_samples _measure_sum_with_samples
vincentmr Mar 19, 2024
f1b0a62
fix tests without binary
AmintorDusko Mar 19, 2024
80425ee
Merge branch 'lightning-qubit-new-api' of https://github.com/PennyLan…
AmintorDusko Mar 19, 2024
1803e39
check for jac size before reshaping
AmintorDusko Mar 19, 2024
a4c73ca
remove obsolete tests
AmintorDusko Mar 19, 2024
e359c30
organize tests
AmintorDusko Mar 19, 2024
739f0b4
fix test for Windows wheels
AmintorDusko Mar 19, 2024
8c153b3
Adding LC to supported obs list for all devices
mudit2812 Mar 19, 2024
353e6bc
Updating serialization
mudit2812 Mar 19, 2024
6687fc8
Trying out test changes
mudit2812 Mar 20, 2024
cae72b4
Updated PL dependency
mudit2812 Mar 20, 2024
1962ea5
Running isort
mudit2812 Mar 20, 2024
2eeae1a
Update CPP layer for observable accessible functions
mlxd Mar 20, 2024
c6e344d
Auto update version
github-actions[bot] Mar 20, 2024
a6cf065
Allow output from TP CPP layer
mlxd Mar 20, 2024
100885f
Merge branch 'feature/linear-combination' of github.com:PennyLaneAI/p…
mlxd Mar 20, 2024
0eec0ec
initial commit
multiphaseCFD Mar 20, 2024
c08dd47
Fixed serialize tests
mudit2812 Mar 20, 2024
383f402
fix windows ci
multiphaseCFD Mar 20, 2024
b3021a9
Added legacy fixture to failing tests
mudit2812 Mar 20, 2024
208255a
Updated requirements with debug branch
mudit2812 Mar 21, 2024
692b57a
Trigger CI
mudit2812 Mar 21, 2024
58ff8d2
Merge branch 'master' into feature/linear-combination
mudit2812 Mar 21, 2024
40bc003
Auto update version
github-actions[bot] Mar 21, 2024
685a752
Trigger CI
mudit2812 Mar 21, 2024
fef7060
Trigger CI
mudit2812 Mar 21, 2024
d36b9a6
add priority table for scipy.libs loading
multiphaseCFD Mar 21, 2024
b72737a
add filesytem header
multiphaseCFD Mar 21, 2024
e50eac9
Merge branch 'feature/linear-combination' of https://github.com/Penny…
AmintorDusko Mar 21, 2024
bbee87b
fix libLoad for linux
multiphaseCFD Mar 21, 2024
e6809c8
Added recursive logic to find projectors
mudit2812 Mar 21, 2024
b69bd99
Merge branch 'feature/linear-combination' of https://github.com/Penny…
AmintorDusko Mar 21, 2024
7fcb119
format
AmintorDusko Mar 21, 2024
1c0b841
mark tests to be dual tested and some small fixes
AmintorDusko Mar 21, 2024
ace21bd
example of test failing
AmintorDusko Mar 21, 2024
451adf8
remove print and move ham to tape scope
AmintorDusko Mar 21, 2024
5d4bd26
fix currentPath -> current_path
multiphaseCFD Mar 21, 2024
e332555
fix for windows scipy libs iteration
multiphaseCFD Mar 21, 2024
f49711d
windows fix
multiphaseCFD Mar 21, 2024
bed31fd
Fixed expval test; isort
mudit2812 Mar 21, 2024
df44376
Auto update version
github-actions[bot] Mar 21, 2024
1b1a647
Merge branch 'master' into feature/linear-combination
mudit2812 Mar 21, 2024
de85f99
fix windows
multiphaseCFD Mar 21, 2024
1ee6a95
quick fix
multiphaseCFD Mar 21, 2024
83643a5
std::filesystem::path::value_type* LPCSTR convert
multiphaseCFD Mar 21, 2024
a54aa96
windows type convert
multiphaseCFD Mar 21, 2024
44f85e7
isort
mudit2812 Mar 21, 2024
802842a
Updated device tests; changelog entry
mudit2812 Mar 21, 2024
996a26f
get current path of dso with dlfcn apis
multiphaseCFD Mar 21, 2024
c9fba49
quick fix
multiphaseCFD Mar 21, 2024
0625ff1
Update mpitests/test_apply.py
vincentmr Mar 22, 2024
e384f9a
Auto update version
github-actions[bot] Mar 22, 2024
2042818
Merge branch 'master' into feature/linear-combination
vincentmr Mar 22, 2024
876febe
Fix terms in ham serialization.
vincentmr Mar 22, 2024
eb132bc
Use requirements-dev.txt to install black/isort.
vincentmr Mar 22, 2024
28cabce
Mark test_single_return_value flaky. Add comment on split_obs.
vincentmr Mar 22, 2024
3420410
add sharedLibLoader wrapper class
multiphaseCFD Mar 22, 2024
e97f886
fix typo
multiphaseCFD Mar 22, 2024
2923ec4
fix typo
multiphaseCFD Mar 22, 2024
6b16395
remove vcpkg dependence
multiphaseCFD Mar 22, 2024
d677529
windows workflow test
multiphaseCFD Mar 22, 2024
f22d73d
windows yaml test
multiphaseCFD Mar 22, 2024
59b2919
windows yaml test
multiphaseCFD Mar 22, 2024
0324ad8
echo pythonSitePackages
multiphaseCFD Mar 22, 2024
337a5dd
Apply suggestions from code review
mudit2812 Mar 22, 2024
ab66cfa
Merge branch 'master' into feature/linear-combination
mudit2812 Mar 22, 2024
db1c6f6
Auto update version
github-actions[bot] Mar 22, 2024
ee0f93d
windows.yaml tests
multiphaseCFD Mar 22, 2024
3992d20
check child directory of site-packages
multiphaseCFD Mar 22, 2024
cdb00fd
quick fix
multiphaseCFD Mar 22, 2024
a17216b
fix typo
multiphaseCFD Mar 22, 2024
9c9eb1e
set python site-packages with cmake
multiphaseCFD Mar 22, 2024
2cd983f
remove package_site env set from windows.yml
multiphaseCFD Mar 22, 2024
70289a6
fix cmake package_sites get
multiphaseCFD Mar 22, 2024
f113939
check Python_SITELIB variable
multiphaseCFD Mar 22, 2024
0aa7935
check if env is correctly set
multiphaseCFD Mar 22, 2024
f79d96f
install scipy with linux cpp test
multiphaseCFD Mar 22, 2024
ea8f3c8
use config file to pass path scipy to cpp layer
multiphaseCFD Mar 22, 2024
5e3552d
remove liblapack_dev install in ci work flows
multiphaseCFD Mar 22, 2024
e3cfe89
Merge branch 'master' into add_dldso
multiphaseCFD Mar 22, 2024
b9e65ca
Auto update version
github-actions[bot] Mar 22, 2024
a3d9a06
Trigger CI
multiphaseCFD Mar 22, 2024
26a338d
fix typo of path to scipy in windows with cmake
multiphaseCFD Mar 22, 2024
663f503
fix for linux ci
multiphaseCFD Mar 22, 2024
7e0e5c8
install python and scipy for window cpp tests
multiphaseCFD Mar 22, 2024
771f666
debug windows path
multiphaseCFD Mar 23, 2024
8b85740
test for windows
multiphaseCFD Mar 23, 2024
b71cf51
remove iostream in UtilLinearAlg.hpp
multiphaseCFD Mar 23, 2024
3929a92
add specific scipy lib path for windows
multiphaseCFD Mar 23, 2024
d872a1d
replace \ with / in windows
multiphaseCFD Mar 23, 2024
dbbb8ce
use cmake string replace to replace backslash
multiphaseCFD Mar 23, 2024
47082d4
tidy up code
multiphaseCFD Mar 23, 2024
8d42644
codeFactor [skip] & add more win32 cpp tests
multiphaseCFD Mar 23, 2024
510567e
add noinspection CodeFactor
multiphaseCFD Mar 23, 2024
18231b5
codefactor[skip] for LoadLibrary
multiphaseCFD Mar 23, 2024
1d8d450
install scipy with the py cmake can access
multiphaseCFD Mar 23, 2024
fdce2cd
tidy up code
multiphaseCFD Mar 23, 2024
8fa1367
codefactor warning suppress
multiphaseCFD Mar 23, 2024
e1e18c0
cmake call avail python to get sites_package
multiphaseCFD Mar 23, 2024
0b998e5
test
multiphaseCFD Mar 23, 2024
ca84afa
debug windows
multiphaseCFD Mar 23, 2024
db8bb37
strip traling whitespace execute_process
multiphaseCFD Mar 23, 2024
ae7f517
suppress compile time check warning
multiphaseCFD Mar 23, 2024
bec4b4e
fix typo
multiphaseCFD Mar 23, 2024
3f9b6a5
install scipy into local usr package sites
multiphaseCFD Mar 23, 2024
f71de3b
get scipy path directly instead of site-packages
multiphaseCFD Mar 23, 2024
8c1d354
add python_sitelib for scipy search
multiphaseCFD Mar 23, 2024
c506395
Trigger CI
multiphaseCFD Mar 23, 2024
b8e7840
add scipy dependency for wheel building
multiphaseCFD Mar 23, 2024
df27000
test for win wheel build
multiphaseCFD Mar 23, 2024
cf9e522
windows wheel fix test
multiphaseCFD Mar 23, 2024
450353d
install scipy with cmake
multiphaseCFD Mar 23, 2024
0d3db1b
win wheels
multiphaseCFD Mar 23, 2024
3858f20
fix multiple python version in win wheels build
multiphaseCFD Mar 24, 2024
1ab88c0
debug win wheels build
multiphaseCFD Mar 24, 2024
787a901
abs path search for cpp backend, rpath for python
multiphaseCFD Mar 24, 2024
8058c0a
quick fix
multiphaseCFD Mar 24, 2024
1f08d01
quick fix
multiphaseCFD Mar 24, 2024
aa73793
lapack path info stored in config.hpp for macos
multiphaseCFD Mar 24, 2024
2e16759
add a dummy config.h
multiphaseCFD Mar 24, 2024
4cb82a2
fix getPath
multiphaseCFD Mar 24, 2024
c4c4127
Merge branch 'master' into feature/linear-combination
mlxd Mar 25, 2024
20f2375
Auto update version
github-actions[bot] Mar 25, 2024
04a86ab
Trigger CI
mlxd Mar 25, 2024
bf24212
Fix format
mlxd Mar 25, 2024
0e6480c
get scipy path from env variable
multiphaseCFD Mar 25, 2024
73a7fea
Auto update version
github-actions[bot] Mar 25, 2024
0b0629b
Merge branch 'master' into add_dldso
multiphaseCFD Mar 25, 2024
0af73ee
Merge branch 'add_dldso' of https://github.com/PennyLaneAI/pennylane-…
multiphaseCFD Mar 25, 2024
3a3bed3
quick fix
multiphaseCFD Mar 25, 2024
cd3ebff
debug windows
multiphaseCFD Mar 25, 2024
04fe74b
quick test
multiphaseCFD Mar 25, 2024
2410534
debug getenv
multiphaseCFD Mar 25, 2024
3bf3ff9
Updated PL branch in reqs-dev
mudit2812 Mar 25, 2024
778ed5c
debug python
multiphaseCFD Mar 25, 2024
d6aa58e
debug
multiphaseCFD Mar 25, 2024
d68ff61
Update requirements
mudit2812 Mar 25, 2024
190ebed
fix workflow
multiphaseCFD Mar 25, 2024
4f5ce80
debug
multiphaseCFD Mar 25, 2024
7886385
debug
multiphaseCFD Mar 25, 2024
295d9a2
use absoute path for file exists check
multiphaseCFD Mar 25, 2024
464c5d6
link against dl
multiphaseCFD Mar 25, 2024
d9a5165
test
multiphaseCFD Mar 25, 2024
42a370c
Added fix for prod with overlapping wires
mudit2812 Mar 25, 2024
2ca991d
Formatting
mudit2812 Mar 25, 2024
f3746d6
test with -rdynamic
multiphaseCFD Mar 25, 2024
de9e25d
link against dl
multiphaseCFD Mar 25, 2024
d0d75cd
revert to get scipylibs with config.h.in
multiphaseCFD Mar 26, 2024
caf83ef
windows fix
multiphaseCFD Mar 26, 2024
a2dd9ca
setup win wheels build venv with CIBW_BEFORE_ALL
multiphaseCFD Mar 26, 2024
0b89302
fix for windows wheel build
multiphaseCFD Mar 26, 2024
ab73fb8
activate venv before windows wheels build
multiphaseCFD Mar 26, 2024
fc581c6
quick fix
multiphaseCFD Mar 26, 2024
77b3b7b
quick fix win wheels
multiphaseCFD Mar 26, 2024
9f2b794
quick fix for win wheel build
multiphaseCFD Mar 26, 2024
25e30b8
add scipy to requirements
multiphaseCFD Mar 26, 2024
b2f4e8d
runtime load in relative path fix test
multiphaseCFD Mar 26, 2024
dc79e6e
remove scipy from requirements in setup.py
multiphaseCFD Mar 26, 2024
2e5179c
add inline to fix compile time
multiphaseCFD Mar 26, 2024
0edb842
Point requirements to PL master
mudit2812 Mar 26, 2024
3dadb69
support both rpath and SCIPY_LIBS_PATH search
multiphaseCFD Mar 26, 2024
feca13c
Pinning cmake
mudit2812 Mar 26, 2024
5ece74f
add lapack.so search in default search path
multiphaseCFD Mar 26, 2024
3f094d9
make format
multiphaseCFD Mar 26, 2024
6b7d6c7
quick fix
multiphaseCFD Mar 26, 2024
6eccfd2
quick fix
multiphaseCFD Mar 26, 2024
1f2cd7a
install lapack
multiphaseCFD Mar 26, 2024
81a114c
quick fix
multiphaseCFD Mar 26, 2024
5cf765b
Pinned cmake in workflows
mudit2812 Mar 26, 2024
c54af45
Pinned cmake in more workflows
mudit2812 Mar 26, 2024
f2ab0a9
Trigger CI
mudit2812 Mar 26, 2024
59a1411
quick tests
multiphaseCFD Mar 26, 2024
b0e8637
quick fix
multiphaseCFD Mar 26, 2024
8f696eb
quick fix
multiphaseCFD Mar 26, 2024
475a1dc
Apply suggestions from code review
mudit2812 Mar 26, 2024
0a901fc
quickfix
multiphaseCFD Mar 26, 2024
a698448
[skip ci] Apply suggestions from code review
mudit2812 Mar 26, 2024
08e2d4a
Trigger CI
mudit2812 Mar 26, 2024
e2d6c6a
update sharedlibloader
multiphaseCFD Mar 26, 2024
54f6b47
remove canonical file
multiphaseCFD Mar 26, 2024
5f9d7b1
install scipy linux ci
multiphaseCFD Mar 26, 2024
6c6259b
Fix indent.
vincentmr Mar 26, 2024
f2fa464
Fix workflow files indentation
mudit2812 Mar 26, 2024
92e1203
Comment triggers. (#662)
vincentmr Mar 26, 2024
3cf4d28
Merge remote-tracking branch 'origin/feature/linear-combination' into…
multiphaseCFD Mar 26, 2024
fc3d534
add pragma onceguard
multiphaseCFD Mar 26, 2024
6d42dbe
quick test
multiphaseCFD Mar 26, 2024
5202cb5
remove tests on win32
multiphaseCFD Mar 26, 2024
e8438c8
make format
multiphaseCFD Mar 26, 2024
57be532
tidy up code
multiphaseCFD Mar 26, 2024
19d34f1
use absolute path for scipy.libs
multiphaseCFD Mar 27, 2024
5dbd14f
Auto update version
github-actions[bot] Mar 27, 2024
4532df1
Merge branch 'master' into add_dldso
multiphaseCFD Mar 27, 2024
db0015b
Merge branch 'add_dldso' of https://github.com/PennyLaneAI/pennylane-…
multiphaseCFD Mar 27, 2024
4fb27dc
fix typo
multiphaseCFD Mar 27, 2024
a17334d
test for lapack is not available
multiphaseCFD Mar 27, 2024
97830a3
remove lapack from gpu tests
multiphaseCFD Mar 27, 2024
a0db3f0
parse string to get scipy.libs in site-pack
multiphaseCFD Mar 27, 2024
cd8fba2
use scipy.libs only for lapack apis
multiphaseCFD Mar 27, 2024
f329ac0
tidy up code
multiphaseCFD Mar 27, 2024
9b2f8a8
update docs and add changelog
multiphaseCFD Mar 27, 2024
6ff1881
make format
multiphaseCFD Mar 27, 2024
5bcae01
tidy up code
multiphaseCFD Mar 27, 2024
cdf75f1
init commit
multiphaseCFD Mar 28, 2024
73e6c65
Auto update version
github-actions[bot] Mar 28, 2024
7c31682
Merge branch 'master' into add_dldso_win32
multiphaseCFD Mar 28, 2024
6ae076f
Merge branch 'add_dldso_win32' of https://github.com/PennyLaneAI/penn…
multiphaseCFD Mar 28, 2024
32b4e19
quick test
multiphaseCFD Mar 28, 2024
c7ec8ac
quick test
multiphaseCFD Mar 28, 2024
1a7dfd1
install scipy if not found with python_sitelib
multiphaseCFD Mar 29, 2024
fd84807
quick tests
multiphaseCFD Mar 29, 2024
105f95e
use IS_DIRECTORY to check
multiphaseCFD Mar 29, 2024
d9aada9
quick fix
multiphaseCFD Mar 29, 2024
8a25628
quick test
multiphaseCFD Mar 29, 2024
554a1d6
ensure scipy is installed when running setup.py
multiphaseCFD Mar 29, 2024
da7cb6b
bug fix
multiphaseCFD Mar 29, 2024
e5b5986
pass site_directory from setup.py
multiphaseCFD Mar 29, 2024
f18b0c6
quick test
multiphaseCFD Mar 29, 2024
354151f
revert to static_assert
multiphaseCFD Mar 31, 2024
610fe80
add cstddef to OpToMemberFuncPtr
multiphaseCFD Mar 31, 2024
aeb41f9
type cast
multiphaseCFD Mar 31, 2024
763db61
debug
multiphaseCFD Mar 31, 2024
ff1ae2c
test
multiphaseCFD Mar 31, 2024
d60d04d
quick test
multiphaseCFD Mar 31, 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
8 changes: 7 additions & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

### New features since last release

* Add dynamic linking to LAPACK/OpenBlas shared objects in scipy.libs for both C++ and Python layer.
[(#651)](https://github.com/PennyLaneAI/pennylane-lightning/pull/651)

* `lightning.qubit` supports mid-circuit measurements.
[(#650)](https://github.com/PennyLaneAI/pennylane-lightning/pull/650)

Expand Down Expand Up @@ -29,6 +32,9 @@

### Breaking changes

* Deprecate static LAPACK linking support.
[(#651)](https://github.com/PennyLaneAI/pennylane-lightning/pull/651)

* Migrate `lightning.qubit` to the new device API.
[(#646)](https://github.com/PennyLaneAI/pennylane-lightning/pull/646)

Expand Down Expand Up @@ -60,7 +66,7 @@

This release contains contributions from (in alphabetical order):

Ali Asadi, Amintor Dusko, Christina Lee, Vincent Michaud-Rioux, Mudit Pandey
Ali Asadi, Amintor Dusko, Christina Lee, Vincent Michaud-Rioux, Mudit Pandey, Shuli Shu

---

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tests_gpu_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
required: true
description: The version of PennyLane to use. Valid values are either 'release' (most recent release candidate), 'stable' (most recent git-tag) or 'latest' (most recent commit from master)
release:
pull_request:
#pull_request:
push:
branches:
- master
Expand Down Expand Up @@ -130,7 +130,6 @@ jobs:
cmake . -BBuild \
-DCUQUANTUM_SDK=$(python -c "import site; print( f'{site.getsitepackages()[0]}/cuquantum')")\
-DBUILD_TESTS=ON \
-DENABLE_LAPACK=ON \
-DENABLE_PYTHON=OFF \
-DPL_BACKEND=${{ matrix.pl_backend }} \
-DCMAKE_CXX_COMPILER=$(which g++-$GCC_VERSION) \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_gpu_kokkos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
type: string
required: true
description: The version of PennyLane to use. Valid values are either 'release' (most recent release candidate), 'stable' (most recent git-tag) or 'latest' (most recent commit from master)
pull_request:
#pull_request:
push:
branches:
- master
Expand Down
104 changes: 30 additions & 74 deletions .github/workflows/tests_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
type: string
required: true
description: The version of PennyLane to use. Valid values are either 'release' (most recent release candidate), 'stable' (most recent git-tag) or 'latest' (most recent commit from master)
pull_request:
#pull_request:
push:
branches:
- master
Expand Down Expand Up @@ -47,14 +47,15 @@ jobs:
uses: actions/checkout@v3

- name: Install dependencies
run: echo ${{ github.event_name }} && sudo apt-get update && sudo apt-get -y -q install cmake gcc-$GCC_VERSION g++-$GCC_VERSION liblapack-dev ninja-build gcovr lcov
run: |
echo ${{ github.event_name }} && sudo apt-get update && sudo apt-get -y -q install cmake gcc-$GCC_VERSION g++-$GCC_VERSION ninja-build gcovr lcov
python -m pip install scipy

- name: Build and run unit tests
run: |
cmake . -BBuild -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_TESTS=ON \
-DENABLE_LAPACK=ON \
-DENABLE_PYTHON=OFF \
-DPL_BACKEND=${{ matrix.pl_backend }} \
-DCMAKE_CXX_COMPILER=$(which g++-$GCC_VERSION) \
Expand Down Expand Up @@ -111,6 +112,11 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.9'

- name: Checkout PennyLane-Lightning
uses: actions/checkout@v3
with:
Expand All @@ -133,13 +139,10 @@ jobs:
git log -1 --format='%H'
git status

- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.9'

- name: Install dependencies
run: sudo apt-get update && sudo apt-get -y -q install cmake gcc-$GCC_VERSION g++-$GCC_VERSION
run: |
sudo apt-get update && sudo apt-get -y -q install cmake gcc-$GCC_VERSION g++-$GCC_VERSION
python -m pip install scipy

- name: Get required Python packages
run: |
Expand Down Expand Up @@ -218,7 +221,9 @@ jobs:
uses: actions/checkout@v3

- name: Install dependencies
run: sudo apt-get update && sudo apt-get -y -q install cmake gcc-$GCC_VERSION g++-$GCC_VERSION liblapack-dev libopenblas-dev ninja-build gcovr lcov
run: |
sudo apt-get update && sudo apt-get -y -q install cmake gcc-$GCC_VERSION g++-$GCC_VERSION libopenblas-dev ninja-build gcovr lcov
python -m pip install scipy

- name: Build and run unit tests
run: |
Expand All @@ -228,7 +233,6 @@ jobs:
-DENABLE_BLAS=ON \
-DPL_BACKEND=${{ matrix.pl_backend }} \
-DBUILD_TESTS=ON \
-DENABLE_LAPACK=ON \
-DCMAKE_CXX_COMPILER=$(which g++-$GCC_VERSION) \
-DENABLE_COVERAGE=ON
cmake --build ./Build
Expand All @@ -237,62 +241,6 @@ jobs:
for file in *runner ; do ./$file --order lex --reporter junit --out ./tests/results/report_$file.xml; done;
lcov --directory . -b ../pennylane_lightning/core/src --capture --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info
mv coverage.info coverage-${{ github.job }}-${{ matrix.pl_backend }}-Lapack.info

- name: Upload test results
uses: actions/upload-artifact@v3
if: always()
with:
name: ubuntu-tests-reports-${{ github.job }}-${{ matrix.pl_backend }}-Lapack
path: ./Build/tests/results/
if-no-files-found: error

- name: Upload code coverage results
uses: actions/upload-artifact@v3
with:
name: ubuntu-codecov-results-cpp
path: ./Build/coverage-${{ github.job }}-${{ matrix.pl_backend }}-Lapack.info
if-no-files-found: error

cpptestswithOpenBLASNoLAPACK:
if: ${{ !contains(fromJSON('["schedule", "workflow_dispatch"]'), github.event_name) }}
strategy:
matrix:
os: [ubuntu-22.04]
pl_backend: ["lightning_qubit"]
timeout-minutes: 60
name: C++ tests (OpenBLAS without LAPACK)
runs-on: ${{ matrix.os }}

steps:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.9'

- name: Checkout PennyLane-Lightning
uses: actions/checkout@v3

- name: Install dependencies
run: sudo apt-get update && sudo apt-get -y -q install cmake gcc-$GCC_VERSION g++-$GCC_VERSION liblapack-dev libopenblas-dev ninja-build gcovr lcov

- name: Build and run unit tests
run: |
cmake . -BBuild -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_PYTHON=OFF \
-DPL_BACKEND=${{ matrix.pl_backend }} \
-DBUILD_TESTS=ON \
-DENABLE_LAPACK=OFF \
-DCMAKE_CXX_COMPILER=$(which g++-$GCC_VERSION) \
-DENABLE_COVERAGE=ON \
-DLQ_ENABLE_KERNEL_OMP=ON
cmake --build ./Build
cd ./Build
mkdir -p ./tests/results
for file in *runner ; do ./$file --order lex --reporter junit --out ./tests/results/report_$file.xml; done;
lcov --directory . -b ../pennylane_lightning/core/src --capture --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info
mv coverage.info coverage-${{ github.job }}-${{ matrix.pl_backend }}.info

- name: Upload test results
Expand Down Expand Up @@ -348,7 +296,9 @@ jobs:
python-version: '3.9'

- name: Install dependencies
run: sudo apt-get update && sudo apt-get -y -q install cmake gcc-$GCC_VERSION g++-$GCC_VERSION libopenblas-dev
run: |
sudo apt-get update && sudo apt-get -y -q install cmake gcc-$GCC_VERSION g++-$GCC_VERSION libopenblas-dev
python -m pip install scipy

- name: Get required Python packages
run: |
Expand Down Expand Up @@ -386,6 +336,7 @@ jobs:
- name: Install backend device
run: |
cd main
python -m pip install scipy
CMAKE_ARGS="-DPL_BACKEND=${{ matrix.pl_backend }} -DENABLE_BLAS=ON -DENABLE_PYTHON=ON -DCMAKE_CXX_COMPILER=$(which g++-$GCC_VERSION)" \
python -m pip install -e . -vv

Expand Down Expand Up @@ -449,14 +400,15 @@ jobs:
cp -rf ${{ github.workspace}}/Kokkos_install/${{ matrix.exec_model }}/* Kokkos/

- name: Install dependencies
run: sudo apt-get update && sudo apt-get -y -q install cmake gcc-$GCC_VERSION g++-$GCC_VERSION liblapack-dev ninja-build gcovr lcov
run: |
sudo apt-get update && sudo apt-get -y -q install cmake gcc-$GCC_VERSION g++-$GCC_VERSION ninja-build gcovr lcov
python -m pip install scipy

- name: Build and run unit tests
run: |
cmake . -BBuild -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_TESTS=ON \
-DENABLE_LAPACK=ON \
-DENABLE_PYTHON=OFF \
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/Kokkos \
-DPL_BACKEND=${{ matrix.pl_backend }} \
Expand Down Expand Up @@ -544,7 +496,9 @@ jobs:
pwd

- name: Install dependencies
run: sudo apt-get update && sudo apt-get -y -q install cmake gcc-$GCC_VERSION g++-$GCC_VERSION
run: |
sudo apt-get update && sudo apt-get -y -q install cmake gcc-$GCC_VERSION g++-$GCC_VERSION
python -m pip install scipy

- name: Get required Python packages
run: |
Expand Down Expand Up @@ -583,6 +537,7 @@ jobs:
if: ${{ matrix.pl_backend != 'all'}}
run: |
cd main
python -m pip install scipy
SKIP_COMPILATION=True PL_BACKEND="lightning_qubit" pip install -e . -vv
CMAKE_ARGS="-DPL_BACKEND=${{ matrix.pl_backend }} -DCMAKE_PREFIX_PATH=${{ github.workspace }}/Kokkos -DENABLE_PYTHON=ON -DCMAKE_CXX_COMPILER=$(which g++-$GCC_VERSION)" \
python -m pip install -e . -vv
Expand Down Expand Up @@ -658,7 +613,7 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}

upload-to-codecov-linux-cpp:
needs: [cpptests, cpptestswithOpenBLAS, cpptestswithOpenBLASNoLAPACK, cpptestswithKokkos]
needs: [cpptests, cpptestswithOpenBLAS, cpptestswithKokkos]
name: Upload cpp coverage data to codecov
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -713,15 +668,16 @@ jobs:
cp -rf ${{ github.workspace}}/Kokkos_install/${{ matrix.exec_model }}/* Kokkos/

- name: Install dependencies
run: sudo apt-get update && sudo apt-get -y -q install cmake gcc-$GCC_VERSION g++-$GCC_VERSION liblapack-dev ninja-build gcovr lcov
run: |
sudo apt-get update && sudo apt-get -y -q install cmake gcc-$GCC_VERSION g++-$GCC_VERSION ninja-build gcovr lcov
python -m pip install scipy

- name: Build and run unit tests
run: |
set -x
cmake . -BBuild -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_TESTS=ON \
-DENABLE_LAPACK=ON \
-DENABLE_PYTHON=OFF \
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/Kokkos \
-DPL_BACKEND="lightning_qubit;lightning_kokkos" \
Expand Down
21 changes: 5 additions & 16 deletions .github/workflows/tests_linux_x86_mpi_gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
push:
branches:
- main
pull_request:
#pull_request:

env:
COVERAGE_FLAGS: "--cov=pennylane_lightning --cov-report=term-missing --cov-report=xml:./coverage.xml --no-flaky-report -p no:warnings --tb=native"
Expand Down Expand Up @@ -54,11 +54,6 @@ jobs:
run: |
git fetch tags --force
git checkout $(git tag | sort -V | tail -1)
- uses: actions/setup-python@v4
id: setup_python
name: Install Python
with:
python-version: '3.9'

# Since the self-hosted runner can be re-used. It is best to set up all package
# installations in a virtual environment that gets cleaned at the end of each workflow run
Expand Down Expand Up @@ -96,8 +91,7 @@ jobs:
python -m pip install -r requirements-dev.txt
# Omitting the installation of cmake v3.29.0 due to
# https://github.com/scikit-build/cmake-python-distributions/pull/474
python -m pip install "cmake!=3.29.0" custatevec-cu12
sudo apt-get -y -q install liblapack-dev
python -m pip install "cmake!=3.29.0" custatevec-cu12 scipy

- name: Validate GPU version and installed compiler and modules
run: |
Expand All @@ -122,11 +116,11 @@ jobs:
export CUQUANTUM_SDK=$(python -c "import site; print( f'{site.getsitepackages()[0]}/cuquantum/lib')")
cmake . -BBuild \
-DPL_BACKEND=lightning_gpu \
-DENABLE_PYTHON=OFF \
-DENABLE_MPI=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_COVERAGE=ON \
-DBUILD_TESTS=ON \
-DENABLE_LAPACK=ON \
-DCMAKE_CXX_COMPILER=mpicxx \
-DCMAKE_CUDA_COMPILER=$(which nvcc) \
-DCMAKE_CUDA_ARCHITECTURES="86" \
Expand Down Expand Up @@ -198,13 +192,6 @@ jobs:
git fetch --tags --force
git checkout $(git tag | sort -V | tail -1)


- uses: actions/setup-python@v4
id: setup_python
name: Install Python
with:
python-version: '3.9'

# Since the self-hosted runner can be re-used. It is best to set up all package
# installations in a virtual environment that gets cleaned at the end of each workflow run
- name: Setup Python virtual environment
Expand All @@ -226,6 +213,8 @@ jobs:
source ${{ env.VENV_NAME }}/bin/activate
echo "venv_name=${{ env.VENV_NAME }}" >> $GITHUB_OUTPUT

python -m pip install scipy

- name: Display Python-Path
id: python_path
run: |
Expand Down
Loading
Loading