diff --git a/.cudaq_version b/.cudaq_version index 8cd50aa5..31195297 100644 --- a/.cudaq_version +++ b/.cudaq_version @@ -1,6 +1,6 @@ { "cudaq": { "repository": "NVIDIA/cuda-quantum", - "ref": "4f284af95b252e69ab08ba4f1ef7fa1ea69dd66a" + "ref": "94830b18a74a9fb50eb81777f76a495f04a51f6a" } } diff --git a/.github/workflows/build_dev.yaml b/.github/workflows/build_dev.yaml index 1f93349f..7fe47e5f 100644 --- a/.github/workflows/build_dev.yaml +++ b/.github/workflows/build_dev.yaml @@ -193,6 +193,7 @@ jobs: BUILDARGS="--build-arg base_image=ghcr.io/nvidia/cuda-quantum-devdeps:manylinux-${{ matrix.platform }}-cu${{ matrix.cuda_version }}-gcc11-main" BUILDARGS+=" --build-arg python_version=${{ matrix.python }}" BUILDARGS+=" --build-arg cuda_version=${{ matrix.cuda_version }}" + BUILDARGS+=" --ulimit nofile=1048576:1048576" # For some reason, this fails on amd64 unless DOCKER_BUILDKIT=0 is set. # The exact error is: too many open files. DOCKER_BUILDKIT=0 docker build $TAGS $BUILDARGS -f docker/build_env/cudaqx.wheel.Dockerfile . diff --git a/.github/workflows/build_wheels.yaml b/.github/workflows/build_wheels.yaml index 0d866ebc..81ad1191 100644 --- a/.github/workflows/build_wheels.yaml +++ b/.github/workflows/build_wheels.yaml @@ -50,7 +50,9 @@ jobs: # easier to rely on their's devdeps images to do the building. # FIXME: there is no guarantee that this CUDA-Q image aligns with the CUDA-Q # commit that we are trying to align with. - container: ghcr.io/nvidia/cuda-quantum-devdeps:manylinux-${{ matrix.platform }}-cu${{ matrix.cuda_version }}-gcc11-main + container: + image: ghcr.io/nvidia/cuda-quantum-devdeps:manylinux-${{ matrix.platform }}-cu${{ matrix.cuda_version }}-gcc11-main + options: --ulimit nofile=1048576:1048576 permissions: write-all strategy: fail-fast: false @@ -145,7 +147,7 @@ jobs: - name: Build CUDAQ toolchain run: | - .github/workflows/scripts/build_cudaq.sh --python-version ${{ matrix.python }} + .github/workflows/scripts/build_cudaq.sh --python-version ${{ matrix.python }} --cuda-version ${{ matrix.cuda_version }} - name: Build CUDA-QX wheels shell: bash diff --git a/.github/workflows/scripts/build_cudaq.sh b/.github/workflows/scripts/build_cudaq.sh index 5c0354ad..eaffac08 100755 --- a/.github/workflows/scripts/build_cudaq.sh +++ b/.github/workflows/scripts/build_cudaq.sh @@ -16,6 +16,7 @@ show_help() { echo "Usage: $0 [options]" echo "Options:" echo " --python-version Python version to build wheel for (e.g. 3.10)" + echo " --cuda-version CUDA version to build wheel for (e.g. 12.6 or 13.0)" echo " -j Number of parallel jobs to build CUDA-Q with" echo " (e.g. 8)" } @@ -32,6 +33,15 @@ parse_options() { exit 1 fi ;; + --cuda-version) + if [[ -n "$2" && "$2" != -* ]]; then + cuda_version=("$2") + shift 2 + else + echo "Error: Argument for $1 is missing" >&2 + exit 1 + fi + ;; -j) if [[ -n "$2" && "$2" != -* ]]; then num_par_jobs=("$2") @@ -59,12 +69,13 @@ parse_options() { # Defaults python_version=3.10 cudaq_ninja_jobs_arg="" +cuda_version=12.6 # Parse options parse_options "$@" -export CUDA_VERSION=12.6 +export CUDA_VERSION=${cuda_version} export CUDAQ_INSTALL_PREFIX=/usr/local/cudaq # We need to use a newer toolchain because CUDA-QX libraries rely on c++20 diff --git a/docker/build_env/cudaqx.wheel.Dockerfile b/docker/build_env/cudaqx.wheel.Dockerfile index 288d5b72..8c180998 100644 --- a/docker/build_env/cudaqx.wheel.Dockerfile +++ b/docker/build_env/cudaqx.wheel.Dockerfile @@ -35,5 +35,5 @@ RUN mkdir -p /workspaces/cudaqx/cudaq && cd /workspaces/cudaqx/cudaq \ && git fetch -q --depth=1 origin ${CUDAQ_COMMIT} \ && git reset --hard FETCH_HEAD \ && cd .. \ - && bash build_cudaq.sh --python-version ${python_version} \ + && bash build_cudaq.sh --python-version ${python_version} --cuda-version ${cuda_version} \ && rm -rf cudaq