Skip to content

Commit

Permalink
Hardcode backend values in python tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentmr committed Oct 16, 2023
1 parent 9115107 commit 7636d80
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/tests_linux_x86_mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,20 +265,17 @@ jobs:
- name: Build and install package (MPICH backend)
env:
CUQUANTUM_SDK: $(python -c "import site; print( f'{site.getsitepackages()[0]}/cuquantum/lib')")
PL_BACKEND: lightning_gpu
run: |
python setup.py build_ext -i --define="CMAKE_CXX_COMPILER=$(which g++-${{ env.GCC_VERSION }});CMAKE_PREFIX_PATH=/opt/mpi/mpich;ENABLE_MPI=ON;CMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc;CMAKE_CUDA_ARCHITECTURES=${{ env.CI_CUDA_ARCH }};Python_EXECUTABLE=${{ steps.python_path.outputs.python }}"
python -m pip install -e . --verbose
PL_BACKEND=lightning_gpu python setup.py build_ext -i --define="CMAKE_CXX_COMPILER=$(which g++-${{ env.GCC_VERSION }});CMAKE_PREFIX_PATH=/opt/mpi/mpich;ENABLE_MPI=ON;CMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc;CMAKE_CUDA_ARCHITECTURES=${{ env.CI_CUDA_ARCH }};Python_EXECUTABLE=${{ steps.python_path.outputs.python }}"
PL_BACKEND=lightning_gpu python -m pip install -e . --verbose
- name: Run PennyLane-Lightning-GPU unit tests (MPICH backend)
env:
PL_DEVICE: lightning.gpu
run: |
source /etc/profile.d/modules.sh
module use /opt/modules/
module load mpich
/opt/mpi/mpich/bin/mpirun -np 2 python -m pytest ./mpitests/
python -m pytest ./tests/
PL_DEVICE=lightning.gpu /opt/mpi/mpich/bin/mpirun -np 2 python -m pytest ./mpitests/
PL_DEVICE=lightning.gpu python -m pytest ./tests/
- name: Cleanup
if: always()
Expand Down

0 comments on commit 7636d80

Please sign in to comment.