Skip to content

Commit

Permalink
twiddle
Browse files Browse the repository at this point in the history
  • Loading branch information
robertodr committed Sep 25, 2023
1 parent 7fe2579 commit 260109e
Showing 1 changed file with 40 additions and 7 deletions.
47 changes: 40 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
| jq -nRc '{"only": inputs, "os": "macos-latest"}' \
&& cibuildwheel --print-build-identifiers --platform windows \
| jq -nRc '{"only": inputs, "os": "windows-2019"}'
} | jq -sc ) #| jq -c '. + [{"only": "qiskit-aer-gpu-cu11", "os": "ubuntu-latest"}, {"only": "qiskit-aer-gpu-cu12", "os": "ubuntu-latest"}]')
} | jq -sc )
echo "MATRIX IS $MATRIX"
echo "include=$MATRIX" >> $GITHUB_OUTPUT
env:
Expand All @@ -66,19 +66,46 @@ jobs:
steps:
- uses: actions/checkout@v4

#- uses: actions-rs/toolchain@v1
# if: contains(fromJSON('["aarch64", "ppc64le", "s390x"]'), '${{ matrix.only }}')
# with:
# toolchain: stable

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all

- uses: pypa/[email protected]
with:
only: ${{ matrix.only }}

- name: Verify clean directory
run: git diff --exit-code
shell: bash

- name: Upload wheels
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl

build-gpu-wheels:
name: Build ${{ matrix.only }}
needs: generate-wheels-matrix
strategy:
matrix:
include: ${{ fromJson(needs.generate-wheels-matrix.outputs.include) }}
cibw_settings: [
{
before-all: "yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda-repo-rhel7-12-1-local-12.1.1_530.30.02-1.x86_64.rpm && rpm -i cuda-repo-rhel7-12-1-local-12.1.1_530.30.02-1.x86_64.rpm && yum clean all && yum -y install cuda && yum -y install openblas-devel && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo && yum clean all",
before-build: "pip install nvidia-cuda-runtime-cu12 nvidia-cublas-cu12 nvidia-cusolver-cu12 nvidia-cusparse-cu12 cuquantum-cu12",
environment: {QISKIT_AER_PACKAGE_NAME="qiskit-aer-gpu", QISKIT_AER_CUDA_MAJOR="12", AER_CUDA_ARCH="7.0 7.2 7.5 8.0 8.6 8.7 9.0"},
repair-wheel-command: 'auditwheel repair --exclude libcudart.so.12 --exclude libcustatevec.so.1 --exclude libcutensornet.so.2 --exclude libcutensor.so.1 --exclude libcutensorMg.so.1 --exclude libcusolver.so.11 --exclude libcusolverMg.so.11 --exclude libcusolver.so.12 --exclude libcusolverMg.so.12 --exclude libcusparse.so.12 --exclude libcublas.so.12 --exclude libcublasLt.so.12 --exclude libnvJitLink.so.12 -w {dest_dir} {wheel}'
}
]

if: matrix.os == 'ubuntu-latest'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Maximize build space
if: matrix.os == 'ubuntu-latest' && contains(matrix.only, '-gpu-')
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 40000
Expand All @@ -90,6 +117,12 @@ jobs:
remove-docker-images: 'true'

- uses: pypa/[email protected]
env:
CIBW_BEFORE_ALL: ${{ matrix.cibw_settings.before-all }}
CIBW_BEFORE_BUILD: ${{ matrix.cibw_settings.before-build }}
CIBW_SKIP: "*-manylinux_i686 pp* cp36* *musllinux*"
CIBW_ENVIRONMENT: CMAKE_VERBOSE_MAKEFILE=true AER_THRUST_BACKEND=CUDA CUDACXX=/usr/local/cuda/bin/nvcc AER_PYTHON_CUDA_ROOT=/opt/_internal AER_CIBUILD="true" ${{ matrix.cibw_settings.environment }}
CIBW_REPAIR_WHEEL_COMMAND: $${{ matrix.cibw_settings.repair-wheel-command }}
with:
only: ${{ matrix.only }}

Expand Down

0 comments on commit 260109e

Please sign in to comment.