diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index e4d3f2b..b2658ae 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -8,26 +8,56 @@ jobs: vmImage: ubuntu-latest strategy: matrix: - linux_64_numpy1.22python3.10.____cpython: - CONFIG: linux_64_numpy1.22python3.10.____cpython + linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.22python3.10.____cpython: + CONFIG: linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.22python3.10.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cuda:11.2 + SHORT_CONFIG: linux_64_c_compiler_version10cuda_c_hc3d9155954 + linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.22python3.8.____cpython: + CONFIG: linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.22python3.8.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cuda:11.2 + SHORT_CONFIG: linux_64_c_compiler_version10cuda_c_h8384fb5d2c + linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.22python3.9.____cpython: + CONFIG: linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.22python3.9.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cuda:11.2 + SHORT_CONFIG: linux_64_c_compiler_version10cuda_c_hfc0e89be0d + linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.23python3.11.____cpython: + CONFIG: linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.23python3.11.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cuda:11.2 + SHORT_CONFIG: linux_64_c_compiler_version10cuda_c_h53d7830257 + linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.26python3.12.____cpython: + CONFIG: linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.26python3.12.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cuda:11.2 + SHORT_CONFIG: linux_64_c_compiler_version10cuda_c_h822cc63670 + linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.22python3.10.____cpython: + CONFIG: linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.22python3.10.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_64_numpy1.22python3.8.____cpython: - CONFIG: linux_64_numpy1.22python3.8.____cpython + SHORT_CONFIG: linux_64_c_compiler_version12cuda_c_h30d3536c9c + linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.22python3.8.____cpython: + CONFIG: linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.22python3.8.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_64_numpy1.22python3.9.____cpython: - CONFIG: linux_64_numpy1.22python3.9.____cpython + SHORT_CONFIG: linux_64_c_compiler_version12cuda_c_hd4b3a23069 + linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.22python3.9.____cpython: + CONFIG: linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.22python3.9.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_64_numpy1.23python3.11.____cpython: - CONFIG: linux_64_numpy1.23python3.11.____cpython + SHORT_CONFIG: linux_64_c_compiler_version12cuda_c_h0cba298c1d + linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.23python3.11.____cpython: + CONFIG: linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.23python3.11.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_64_numpy1.26python3.12.____cpython: - CONFIG: linux_64_numpy1.26python3.12.____cpython + SHORT_CONFIG: linux_64_c_compiler_version12cuda_c_ha76770977f + linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.26python3.12.____cpython: + CONFIG: linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.26python3.12.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + SHORT_CONFIG: linux_64_c_compiler_version12cuda_c_hf1c07d5d34 timeoutInMinutes: 360 steps: @@ -56,4 +86,33 @@ jobs: env: BINSTAR_TOKEN: $(BINSTAR_TOKEN) FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) + - script: | + export CI=azure + export CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt) + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + export CONDA_BLD_DIR=build_artifacts + export ARTIFACT_STAGING_DIR="$(Build.ArtifactStagingDirectory)" + # Archive everything in CONDA_BLD_DIR except environments + export BLD_ARTIFACT_PREFIX=conda_artifacts + if [[ "$AGENT_JOBSTATUS" == "Failed" ]]; then + # Archive the CONDA_BLD_DIR environments only when the job fails + export ENV_ARTIFACT_PREFIX=conda_envs + fi + ./.scripts/create_conda_build_artifacts.sh + displayName: Prepare conda build artifacts + condition: succeededOrFailed() + + - task: PublishPipelineArtifact@1 + displayName: Store conda build artifacts + condition: not(eq(variables.BLD_ARTIFACT_PATH, '')) + inputs: + targetPath: $(BLD_ARTIFACT_PATH) + artifactName: $(BLD_ARTIFACT_NAME) + + - task: PublishPipelineArtifact@1 + displayName: Store conda build environment artifacts + condition: not(eq(variables.ENV_ARTIFACT_PATH, '')) + inputs: + targetPath: $(ENV_ARTIFACT_PATH) + artifactName: $(ENV_ARTIFACT_NAME) \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 13b72e3..d0d33b6 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -11,18 +11,23 @@ jobs: osx_64_numpy1.22python3.10.____cpython: CONFIG: osx_64_numpy1.22python3.10.____cpython UPLOAD_PACKAGES: 'True' + SHORT_CONFIG: osx_64_numpy1.22python3.10.____cpython osx_64_numpy1.22python3.8.____cpython: CONFIG: osx_64_numpy1.22python3.8.____cpython UPLOAD_PACKAGES: 'True' + SHORT_CONFIG: osx_64_numpy1.22python3.8.____cpython osx_64_numpy1.22python3.9.____cpython: CONFIG: osx_64_numpy1.22python3.9.____cpython UPLOAD_PACKAGES: 'True' + SHORT_CONFIG: osx_64_numpy1.22python3.9.____cpython osx_64_numpy1.23python3.11.____cpython: CONFIG: osx_64_numpy1.23python3.11.____cpython UPLOAD_PACKAGES: 'True' + SHORT_CONFIG: osx_64_numpy1.23python3.11.____cpython osx_64_numpy1.26python3.12.____cpython: CONFIG: osx_64_numpy1.26python3.12.____cpython UPLOAD_PACKAGES: 'True' + SHORT_CONFIG: osx_64_numpy1.26python3.12.____cpython timeoutInMinutes: 360 steps: @@ -45,4 +50,33 @@ jobs: env: BINSTAR_TOKEN: $(BINSTAR_TOKEN) FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) + - script: | + export CI=azure + export CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt) + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + export CONDA_BLD_DIR=/Users/runner/miniforge3/conda-bld + export ARTIFACT_STAGING_DIR="$(Build.ArtifactStagingDirectory)" + # Archive everything in CONDA_BLD_DIR except environments + export BLD_ARTIFACT_PREFIX=conda_artifacts + if [[ "$AGENT_JOBSTATUS" == "Failed" ]]; then + # Archive the CONDA_BLD_DIR environments only when the job fails + export ENV_ARTIFACT_PREFIX=conda_envs + fi + ./.scripts/create_conda_build_artifacts.sh + displayName: Prepare conda build artifacts + condition: succeededOrFailed() + + - task: PublishPipelineArtifact@1 + displayName: Store conda build artifacts + condition: not(eq(variables.BLD_ARTIFACT_PATH, '')) + inputs: + targetPath: $(BLD_ARTIFACT_PATH) + artifactName: $(BLD_ARTIFACT_NAME) + + - task: PublishPipelineArtifact@1 + displayName: Store conda build environment artifacts + condition: not(eq(variables.ENV_ARTIFACT_PATH, '')) + inputs: + targetPath: $(ENV_ARTIFACT_PATH) + artifactName: $(ENV_ARTIFACT_NAME) \ No newline at end of file diff --git a/.ci_support/linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.22python3.10.____cpython.yaml b/.ci_support/linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.22python3.10.____cpython.yaml new file mode 100644 index 0000000..44e90ff --- /dev/null +++ b/.ci_support/linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.22python3.10.____cpython.yaml @@ -0,0 +1,43 @@ +c_compiler: +- gcc +c_compiler_version: +- '10' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- nvcc +cuda_compiler_version: +- '11.2' +cxx_compiler: +- gxx +cxx_compiler_version: +- '10' +docker_image: +- quay.io/condaforge/linux-anvil-cuda:11.2 +numpy: +- '1.22' +openmpi: +- '4' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +pybind11_abi: +- '4' +python: +- 3.10.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - cdt_name + - docker_image +- - python + - numpy diff --git a/.ci_support/linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.22python3.8.____cpython.yaml b/.ci_support/linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.22python3.8.____cpython.yaml new file mode 100644 index 0000000..638e3d5 --- /dev/null +++ b/.ci_support/linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.22python3.8.____cpython.yaml @@ -0,0 +1,43 @@ +c_compiler: +- gcc +c_compiler_version: +- '10' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- nvcc +cuda_compiler_version: +- '11.2' +cxx_compiler: +- gxx +cxx_compiler_version: +- '10' +docker_image: +- quay.io/condaforge/linux-anvil-cuda:11.2 +numpy: +- '1.22' +openmpi: +- '4' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +pybind11_abi: +- '4' +python: +- 3.8.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - cdt_name + - docker_image +- - python + - numpy diff --git a/.ci_support/linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.22python3.9.____cpython.yaml b/.ci_support/linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.22python3.9.____cpython.yaml new file mode 100644 index 0000000..1c32428 --- /dev/null +++ b/.ci_support/linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.22python3.9.____cpython.yaml @@ -0,0 +1,43 @@ +c_compiler: +- gcc +c_compiler_version: +- '10' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- nvcc +cuda_compiler_version: +- '11.2' +cxx_compiler: +- gxx +cxx_compiler_version: +- '10' +docker_image: +- quay.io/condaforge/linux-anvil-cuda:11.2 +numpy: +- '1.22' +openmpi: +- '4' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +pybind11_abi: +- '4' +python: +- 3.9.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - cdt_name + - docker_image +- - python + - numpy diff --git a/.ci_support/linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.23python3.11.____cpython.yaml b/.ci_support/linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.23python3.11.____cpython.yaml new file mode 100644 index 0000000..433b963 --- /dev/null +++ b/.ci_support/linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.23python3.11.____cpython.yaml @@ -0,0 +1,43 @@ +c_compiler: +- gcc +c_compiler_version: +- '10' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- nvcc +cuda_compiler_version: +- '11.2' +cxx_compiler: +- gxx +cxx_compiler_version: +- '10' +docker_image: +- quay.io/condaforge/linux-anvil-cuda:11.2 +numpy: +- '1.23' +openmpi: +- '4' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +pybind11_abi: +- '4' +python: +- 3.11.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - cdt_name + - docker_image +- - python + - numpy diff --git a/.ci_support/linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.26python3.12.____cpython.yaml b/.ci_support/linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.26python3.12.____cpython.yaml new file mode 100644 index 0000000..5de4c53 --- /dev/null +++ b/.ci_support/linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.26python3.12.____cpython.yaml @@ -0,0 +1,43 @@ +c_compiler: +- gcc +c_compiler_version: +- '10' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- nvcc +cuda_compiler_version: +- '11.2' +cxx_compiler: +- gxx +cxx_compiler_version: +- '10' +docker_image: +- quay.io/condaforge/linux-anvil-cuda:11.2 +numpy: +- '1.26' +openmpi: +- '4' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +pybind11_abi: +- '4' +python: +- 3.12.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - cdt_name + - docker_image +- - python + - numpy diff --git a/.ci_support/linux_64_numpy1.22python3.10.____cpython.yaml b/.ci_support/linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.22python3.10.____cpython.yaml similarity index 79% rename from .ci_support/linux_64_numpy1.22python3.10.____cpython.yaml rename to .ci_support/linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.22python3.10.____cpython.yaml index ab080d1..b10421e 100644 --- a/.ci_support/linux_64_numpy1.22python3.10.____cpython.yaml +++ b/.ci_support/linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.22python3.10.____cpython.yaml @@ -8,6 +8,10 @@ channel_sources: - conda-forge channel_targets: - conda-forge main +cuda_compiler: +- None +cuda_compiler_version: +- None cxx_compiler: - gxx cxx_compiler_version: @@ -31,5 +35,9 @@ target_platform: zip_keys: - - c_compiler_version - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - cdt_name + - docker_image - - python - numpy diff --git a/.ci_support/linux_64_numpy1.22python3.8.____cpython.yaml b/.ci_support/linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.22python3.8.____cpython.yaml similarity index 79% rename from .ci_support/linux_64_numpy1.22python3.8.____cpython.yaml rename to .ci_support/linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.22python3.8.____cpython.yaml index 6c853fc..6e922aa 100644 --- a/.ci_support/linux_64_numpy1.22python3.8.____cpython.yaml +++ b/.ci_support/linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.22python3.8.____cpython.yaml @@ -8,6 +8,10 @@ channel_sources: - conda-forge channel_targets: - conda-forge main +cuda_compiler: +- None +cuda_compiler_version: +- None cxx_compiler: - gxx cxx_compiler_version: @@ -31,5 +35,9 @@ target_platform: zip_keys: - - c_compiler_version - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - cdt_name + - docker_image - - python - numpy diff --git a/.ci_support/linux_64_numpy1.22python3.9.____cpython.yaml b/.ci_support/linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.22python3.9.____cpython.yaml similarity index 79% rename from .ci_support/linux_64_numpy1.22python3.9.____cpython.yaml rename to .ci_support/linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.22python3.9.____cpython.yaml index 35d55ed..db4e0d8 100644 --- a/.ci_support/linux_64_numpy1.22python3.9.____cpython.yaml +++ b/.ci_support/linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.22python3.9.____cpython.yaml @@ -8,6 +8,10 @@ channel_sources: - conda-forge channel_targets: - conda-forge main +cuda_compiler: +- None +cuda_compiler_version: +- None cxx_compiler: - gxx cxx_compiler_version: @@ -31,5 +35,9 @@ target_platform: zip_keys: - - c_compiler_version - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - cdt_name + - docker_image - - python - numpy diff --git a/.ci_support/linux_64_numpy1.23python3.11.____cpython.yaml b/.ci_support/linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.23python3.11.____cpython.yaml similarity index 79% rename from .ci_support/linux_64_numpy1.23python3.11.____cpython.yaml rename to .ci_support/linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.23python3.11.____cpython.yaml index 06f2967..334ddbe 100644 --- a/.ci_support/linux_64_numpy1.23python3.11.____cpython.yaml +++ b/.ci_support/linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.23python3.11.____cpython.yaml @@ -8,6 +8,10 @@ channel_sources: - conda-forge channel_targets: - conda-forge main +cuda_compiler: +- None +cuda_compiler_version: +- None cxx_compiler: - gxx cxx_compiler_version: @@ -31,5 +35,9 @@ target_platform: zip_keys: - - c_compiler_version - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - cdt_name + - docker_image - - python - numpy diff --git a/.ci_support/linux_64_numpy1.26python3.12.____cpython.yaml b/.ci_support/linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.26python3.12.____cpython.yaml similarity index 79% rename from .ci_support/linux_64_numpy1.26python3.12.____cpython.yaml rename to .ci_support/linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.26python3.12.____cpython.yaml index 52f82e7..8c9e425 100644 --- a/.ci_support/linux_64_numpy1.26python3.12.____cpython.yaml +++ b/.ci_support/linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.26python3.12.____cpython.yaml @@ -8,6 +8,10 @@ channel_sources: - conda-forge channel_targets: - conda-forge main +cuda_compiler: +- None +cuda_compiler_version: +- None cxx_compiler: - gxx cxx_compiler_version: @@ -31,5 +35,9 @@ target_platform: zip_keys: - - c_compiler_version - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - cdt_name + - docker_image - - python - numpy diff --git a/.ci_support/osx_64_numpy1.22python3.10.____cpython.yaml b/.ci_support/osx_64_numpy1.22python3.10.____cpython.yaml index 67ccbc0..043e8fc 100644 --- a/.ci_support/osx_64_numpy1.22python3.10.____cpython.yaml +++ b/.ci_support/osx_64_numpy1.22python3.10.____cpython.yaml @@ -8,6 +8,8 @@ channel_sources: - conda-forge channel_targets: - conda-forge main +cuda_compiler_version: +- None cxx_compiler: - clangxx cxx_compiler_version: diff --git a/.ci_support/osx_64_numpy1.22python3.8.____cpython.yaml b/.ci_support/osx_64_numpy1.22python3.8.____cpython.yaml index f5e4d4d..47b3a58 100644 --- a/.ci_support/osx_64_numpy1.22python3.8.____cpython.yaml +++ b/.ci_support/osx_64_numpy1.22python3.8.____cpython.yaml @@ -8,6 +8,8 @@ channel_sources: - conda-forge channel_targets: - conda-forge main +cuda_compiler_version: +- None cxx_compiler: - clangxx cxx_compiler_version: diff --git a/.ci_support/osx_64_numpy1.22python3.9.____cpython.yaml b/.ci_support/osx_64_numpy1.22python3.9.____cpython.yaml index bf783c9..a75abfd 100644 --- a/.ci_support/osx_64_numpy1.22python3.9.____cpython.yaml +++ b/.ci_support/osx_64_numpy1.22python3.9.____cpython.yaml @@ -8,6 +8,8 @@ channel_sources: - conda-forge channel_targets: - conda-forge main +cuda_compiler_version: +- None cxx_compiler: - clangxx cxx_compiler_version: diff --git a/.ci_support/osx_64_numpy1.23python3.11.____cpython.yaml b/.ci_support/osx_64_numpy1.23python3.11.____cpython.yaml index acbad54..2c26630 100644 --- a/.ci_support/osx_64_numpy1.23python3.11.____cpython.yaml +++ b/.ci_support/osx_64_numpy1.23python3.11.____cpython.yaml @@ -8,6 +8,8 @@ channel_sources: - conda-forge channel_targets: - conda-forge main +cuda_compiler_version: +- None cxx_compiler: - clangxx cxx_compiler_version: diff --git a/.ci_support/osx_64_numpy1.26python3.12.____cpython.yaml b/.ci_support/osx_64_numpy1.26python3.12.____cpython.yaml index b2a7cd9..877a2ee 100644 --- a/.ci_support/osx_64_numpy1.26python3.12.____cpython.yaml +++ b/.ci_support/osx_64_numpy1.26python3.12.____cpython.yaml @@ -8,6 +8,8 @@ channel_sources: - conda-forge channel_targets: - conda-forge main +cuda_compiler_version: +- None cxx_compiler: - clangxx cxx_compiler_version: diff --git a/.scripts/create_conda_build_artifacts.sh b/.scripts/create_conda_build_artifacts.sh new file mode 100755 index 0000000..17ec086 --- /dev/null +++ b/.scripts/create_conda_build_artifacts.sh @@ -0,0 +1,113 @@ +#!/usr/bin/env bash + +# INPUTS (environment variables that need to be set before calling this script): +# +# CI (azure/github_actions/UNSET) +# CI_RUN_ID (unique identifier for the CI job run) +# FEEDSTOCK_NAME +# CONFIG (build matrix configuration string) +# SHORT_CONFIG (uniquely-shortened configuration string) +# CONDA_BLD_DIR (path to the conda-bld directory) +# ARTIFACT_STAGING_DIR (use working directory if unset) +# BLD_ARTIFACT_PREFIX (prefix for the conda build artifact name, skip if unset) +# ENV_ARTIFACT_PREFIX (prefix for the conda build environments artifact name, skip if unset) + +# OUTPUTS +# +# BLD_ARTIFACT_NAME +# BLD_ARTIFACT_PATH +# ENV_ARTIFACT_NAME +# ENV_ARTIFACT_PATH + +source .scripts/logging_utils.sh + +# DON'T do set -x, because it results in double echo-ing pipeline commands +# and that might end up inserting extraneous quotation marks in output variables +set -e + +# Check that the conda-build directory exists +if [ ! -d "$CONDA_BLD_DIR" ]; then + echo "conda-build directory does not exist" + exit 1 +fi + +# Set staging dir to the working dir, in Windows style if applicable +if [[ -z "${ARTIFACT_STAGING_DIR}" ]]; then + if pwd -W; then + ARTIFACT_STAGING_DIR=$(pwd -W) + else + ARTIFACT_STAGING_DIR=$PWD + fi +fi +echo "ARTIFACT_STAGING_DIR: $ARTIFACT_STAGING_DIR" + +FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) +if [ -z ${FEEDSTOCK_NAME} ]; then + export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) +fi + +# Set a unique ID for the artifact(s), specialized for this particular job run +ARTIFACT_UNIQUE_ID="${CI_RUN_ID}_${CONFIG}" +if [[ ${#ARTIFACT_UNIQUE_ID} -gt 80 ]]; then + ARTIFACT_UNIQUE_ID="${CI_RUN_ID}_${SHORT_CONFIG}" +fi +echo "ARTIFACT_UNIQUE_ID: $ARTIFACT_UNIQUE_ID" + +# Set a descriptive ID for the archive(s), specialized for this particular job run +ARCHIVE_UNIQUE_ID="${CI_RUN_ID}_${CONFIG}" + +# Make the build artifact zip +if [[ ! -z "$BLD_ARTIFACT_PREFIX" ]]; then + export BLD_ARTIFACT_NAME="${BLD_ARTIFACT_PREFIX}_${ARTIFACT_UNIQUE_ID}" + export BLD_ARTIFACT_PATH="${ARTIFACT_STAGING_DIR}/${FEEDSTOCK_NAME}_${BLD_ARTIFACT_PREFIX}_${ARCHIVE_UNIQUE_ID}.zip" + + ( startgroup "Archive conda build directory" ) 2> /dev/null + + # Try 7z and fall back to zip if it fails (for cross-platform use) + if ! 7z a "$BLD_ARTIFACT_PATH" "$CONDA_BLD_DIR" '-xr!.git/' '-xr!_*_env*/' '-xr!*_cache/' -bb; then + pushd "$CONDA_BLD_DIR" + zip -r -y -T "$BLD_ARTIFACT_PATH" . -x '*.git/*' '*_*_env*/*' '*_cache/*' + popd + fi + + ( endgroup "Archive conda build directory" ) 2> /dev/null + + echo "BLD_ARTIFACT_NAME: $BLD_ARTIFACT_NAME" + echo "BLD_ARTIFACT_PATH: $BLD_ARTIFACT_PATH" + + if [[ "$CI" == "azure" ]]; then + echo "##vso[task.setVariable variable=BLD_ARTIFACT_NAME]$BLD_ARTIFACT_NAME" + echo "##vso[task.setVariable variable=BLD_ARTIFACT_PATH]$BLD_ARTIFACT_PATH" + elif [[ "$CI" == "github_actions" ]]; then + echo "BLD_ARTIFACT_NAME=$BLD_ARTIFACT_NAME" >> $GITHUB_OUTPUT + echo "BLD_ARTIFACT_PATH=$BLD_ARTIFACT_PATH" >> $GITHUB_OUTPUT + fi +fi + +# Make the environments artifact zip +if [[ ! -z "$ENV_ARTIFACT_PREFIX" ]]; then + export ENV_ARTIFACT_NAME="${ENV_ARTIFACT_PREFIX}_${ARTIFACT_UNIQUE_ID}" + export ENV_ARTIFACT_PATH="${ARTIFACT_STAGING_DIR}/${FEEDSTOCK_NAME}_${ENV_ARTIFACT_PREFIX}_${ARCHIVE_UNIQUE_ID}.zip" + + ( startgroup "Archive conda build environments" ) 2> /dev/null + + # Try 7z and fall back to zip if it fails (for cross-platform use) + if ! 7z a "$ENV_ARTIFACT_PATH" -r "$CONDA_BLD_DIR"/'_*_env*/' -bb; then + pushd "$CONDA_BLD_DIR" + zip -r -y -T "$ENV_ARTIFACT_PATH" . -i '*_*_env*/*' + popd + fi + + ( endgroup "Archive conda build environments" ) 2> /dev/null + + echo "ENV_ARTIFACT_NAME: $ENV_ARTIFACT_NAME" + echo "ENV_ARTIFACT_PATH: $ENV_ARTIFACT_PATH" + + if [[ "$CI" == "azure" ]]; then + echo "##vso[task.setVariable variable=ENV_ARTIFACT_NAME]$ENV_ARTIFACT_NAME" + echo "##vso[task.setVariable variable=ENV_ARTIFACT_PATH]$ENV_ARTIFACT_PATH" + elif [[ "$CI" == "github_actions" ]]; then + echo "ENV_ARTIFACT_NAME=$ENV_ARTIFACT_NAME" >> $GITHUB_OUTPUT + echo "ENV_ARTIFACT_PATH=$ENV_ARTIFACT_PATH" >> $GITHUB_OUTPUT + fi +fi \ No newline at end of file diff --git a/README.md b/README.md index 136948b..f4d576d 100644 --- a/README.md +++ b/README.md @@ -27,38 +27,73 @@ Current build status - + - + - + - + - + + + + + + + + + + + + + + + + diff --git a/conda-forge.yml b/conda-forge.yml index e30df6f..0e9bb21 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -4,3 +4,5 @@ github: conda_build: error_overlinking: true conda_forge_output_validation: true +azure: + store_build_artifacts: true diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 87f49b5..59b0190 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -9,17 +9,29 @@ source: url: https://github.com/quantumlib/qsim/archive/refs/tags/v{{ version }}.tar.gz sha256: 81101fe9e6356e54125f703956e787aa366717c1e6e77aea794879b53c84ff60 patches: + - patches/0001-Fix-no-instance-of-constructor-qsim-StateSpaceCUDA-F.patch + - patches/0002-Remove-PUBLIC-from-target_link_libraries-with-OpenMP.patch + - patches/0003-Set-pybind11_INCLUDE_DIRS-correctly-for-CUDA.patch + - patches/0004-Set-PYTHON_INCLUDE_DIR-in-setup.py.patch - patches/0005-Allow-installing-for-Python-3.12.patch + - patches/0006-Set-CUDA_ARCHITECTURES-all-cmake-policy-CMP0104.patch + - patches/0007-Always-skip-test_cirq_qsim_gpu_amplitudes-because-no.patch build: skip: true # [win] + # For some reason Python 3.12 fails to resolve and gives: + # nothing provides _python_rc needed by python-3.12.0rc3-rc3_hab00c5b_1_cpython + skip: true # [cuda_compiler_version != "None" and py==312] number: 1 script: {{ PYTHON }} -m pip install . -vvv --no-deps --no-build-isolation + script_env: + - CUQUANTUM_ROOT=$PREFIX # [cuda_compiler_version != "None"] requirements: build: - {{ compiler('c') }} - {{ compiler('cxx') }} + - {{ compiler('cuda') }} # [cuda_compiler_version != "None"] - pybind11-abi - llvm-openmp # [osx] - libgomp # [linux] @@ -33,6 +45,8 @@ requirements: - wheel - pip - numpy + - cuquantum-python # [cuda_compiler_version != "None"] + - custatevec # [cuda_compiler_version != "None"] run: - python - absl-py @@ -40,6 +54,8 @@ requirements: - pybind11 - typing_extensions - {{ pin_compatible('numpy') }} + - cuquantum-python # [cuda_compiler_version != "None"] + - custatevec # [cuda_compiler_version != "None"] test: imports: @@ -47,8 +63,10 @@ test: source_files: - qsimcirq_tests commands: - - pip check - - cd qsimcirq_tests && pytest -vvv . + # With CUDA `pip cehck` fails with: + # cuquantum-python-cu11 23.10.0 requires custatevec-cu11, which is not installed. + - pip check # [cuda_compiler_version == "None"] + - cd qsimcirq_tests && pytest -vvv . # [cuda_compiler_version == "None"] requires: - pip - pytest diff --git a/recipe/patches/0001-Fix-no-instance-of-constructor-qsim-StateSpaceCUDA-F.patch b/recipe/patches/0001-Fix-no-instance-of-constructor-qsim-StateSpaceCUDA-F.patch new file mode 100644 index 0000000..2111e84 --- /dev/null +++ b/recipe/patches/0001-Fix-no-instance-of-constructor-qsim-StateSpaceCUDA-F.patch @@ -0,0 +1,33 @@ +From c54a130df240418deeffbc59860163b830559211 Mon Sep 17 00:00:00 2001 +From: Bas Nijholt +Date: Wed, 29 Nov 2023 10:16:09 -0800 +Subject: [PATCH 1/6] Fix 'no instance of constructor + "qsim::StateSpaceCUDA::Parameter::Parameter [with FP=float]" matches the + argument list' + +Full error: +./pybind_interface/cuda/pybind_main_cuda.cpp(30): error: no instance of constructor "qsim::StateSpaceCUDA::Parameter::Parameter [with FP=float]" matches the argument list +--- + pybind_interface/cuda/pybind_main_cuda.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/pybind_interface/cuda/pybind_main_cuda.cpp b/pybind_interface/cuda/pybind_main_cuda.cpp +index 57b0ba8..7480140 100644 +--- a/pybind_interface/cuda/pybind_main_cuda.cpp ++++ b/pybind_interface/cuda/pybind_main_cuda.cpp +@@ -27,8 +27,10 @@ namespace qsim { + unsigned num_sim_threads, + unsigned num_state_threads, + unsigned num_dblocks +- ) : ss_params{num_state_threads, num_dblocks} {} +- ++ ) { ++ ss_params.num_threads = num_state_threads; ++ ss_params.num_dblocks = num_dblocks; ++ } + StateSpace CreateStateSpace() const { + return StateSpace(ss_params); + } +-- +2.43.0 + diff --git a/recipe/patches/0002-Remove-PUBLIC-from-target_link_libraries-with-OpenMP.patch b/recipe/patches/0002-Remove-PUBLIC-from-target_link_libraries-with-OpenMP.patch new file mode 100644 index 0000000..9cb2567 --- /dev/null +++ b/recipe/patches/0002-Remove-PUBLIC-from-target_link_libraries-with-OpenMP.patch @@ -0,0 +1,69 @@ +From 8ded22066f402950cf4379850e6eaa157b376fbd Mon Sep 17 00:00:00 2001 +From: Bas Nijholt +Date: Mon, 4 Dec 2023 11:41:19 -0800 +Subject: [PATCH 2/6] Remove PUBLIC from target_link_libraries with + OpenMP::OpenMP_CXX + +Otherwise this could lead to the following problem when building with CUDA: +``` + CMake Error at pybind_interface/cuda/CMakeLists.txt:30 (target_link_libraries): + The plain signature for target_link_libraries has already been used with + the target "qsim_cuda". All uses of target_link_libraries with a target + must be either all-keyword or all-plain. + + The uses of the plain signature are here: + + * /usr/share/cmake-3.16/Modules/FindCUDA.cmake:1836 (target_link_libraries) +``` +--- + pybind_interface/cuda/CMakeLists.txt | 2 +- + pybind_interface/custatevec/CMakeLists.txt | 2 +- + pybind_interface/decide/CMakeLists.txt | 4 +++- + 3 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/pybind_interface/cuda/CMakeLists.txt b/pybind_interface/cuda/CMakeLists.txt +index 89df194..e5644d4 100644 +--- a/pybind_interface/cuda/CMakeLists.txt ++++ b/pybind_interface/cuda/CMakeLists.txt +@@ -27,4 +27,4 @@ set_target_properties(qsim_cuda PROPERTIES + ) + set_source_files_properties(pybind_main_cuda.cpp PROPERTIES LANGUAGE CUDA) + +-target_link_libraries(qsim_cuda PUBLIC OpenMP::OpenMP_CXX) ++target_link_libraries(qsim_cuda OpenMP::OpenMP_CXX) +diff --git a/pybind_interface/custatevec/CMakeLists.txt b/pybind_interface/custatevec/CMakeLists.txt +index 77fe663..8c1d387 100644 +--- a/pybind_interface/custatevec/CMakeLists.txt ++++ b/pybind_interface/custatevec/CMakeLists.txt +@@ -45,4 +45,4 @@ set_target_properties(qsim_custatevec PROPERTIES + ) + set_source_files_properties(pybind_main_custatevec.cpp PROPERTIES LANGUAGE CUDA) + +-target_link_libraries(qsim_custatevec PUBLIC OpenMP::OpenMP_CXX) ++target_link_libraries(qsim_custatevec OpenMP::OpenMP_CXX) +diff --git a/pybind_interface/decide/CMakeLists.txt b/pybind_interface/decide/CMakeLists.txt +index 15d5170..6b36282 100644 +--- a/pybind_interface/decide/CMakeLists.txt ++++ b/pybind_interface/decide/CMakeLists.txt +@@ -30,6 +30,7 @@ if(has_nvcc) + SUFFIX "${PYTHON_MODULE_EXTENSION}" + ) + set_source_files_properties(decide.cpp PROPERTIES LANGUAGE CUDA) ++ target_link_libraries(qsim_decide OpenMP::OpenMP_CXX) + elseif(has_hipcc) + list(APPEND CMAKE_MODULE_PATH "/opt/rocm/lib/cmake/hip") + find_package(HIP REQUIRED) +@@ -41,8 +42,9 @@ elseif(has_hipcc) + PREFIX "${PYTHON_MODULE_PREFIX}" + SUFFIX "${PYTHON_MODULE_EXTENSION}" + ) ++ target_link_libraries(qsim_decide PUBLIC OpenMP::OpenMP_CXX) + else() + pybind11_add_module(qsim_decide decide.cpp) ++ target_link_libraries(qsim_decide PUBLIC OpenMP::OpenMP_CXX) + endif() + +-target_link_libraries(qsim_decide PUBLIC OpenMP::OpenMP_CXX) +-- +2.43.0 + diff --git a/recipe/patches/0003-Set-pybind11_INCLUDE_DIRS-correctly-for-CUDA.patch b/recipe/patches/0003-Set-pybind11_INCLUDE_DIRS-correctly-for-CUDA.patch new file mode 100644 index 0000000..f5d5484 --- /dev/null +++ b/recipe/patches/0003-Set-pybind11_INCLUDE_DIRS-correctly-for-CUDA.patch @@ -0,0 +1,30 @@ +From ef0f8b996af41178689676f4d6b262d9c3c9786c Mon Sep 17 00:00:00 2001 +From: Bas Nijholt +Date: Wed, 29 Nov 2023 15:10:09 -0500 +Subject: [PATCH 3/6] Set pybind11_INCLUDE_DIRS correctly for CUDA + +--- + pybind_interface/cuda/CMakeLists.txt | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/pybind_interface/cuda/CMakeLists.txt b/pybind_interface/cuda/CMakeLists.txt +index e5644d4..d1d4b3f 100644 +--- a/pybind_interface/cuda/CMakeLists.txt ++++ b/pybind_interface/cuda/CMakeLists.txt +@@ -18,7 +18,12 @@ INCLUDE(../GetPybind11.cmake) + find_package(PythonLibs 3.7 REQUIRED) + find_package(CUDA REQUIRED) + +-include_directories(${PYTHON_INCLUDE_DIRS} ${pybind11_SOURCE_DIR}/include) ++include_directories(${PYTHON_INCLUDE_DIRS}) ++if(pybind11_FOUND) ++ include_directories(${pybind11_INCLUDE_DIRS}) ++else() # means pybind11 has been fetched in GetPybind11.cmake ++ include_directories(${pybind11_SOURCE_DIR}/include) ++endif() + + cuda_add_library(qsim_cuda MODULE pybind_main_cuda.cpp) + set_target_properties(qsim_cuda PROPERTIES +-- +2.43.0 + diff --git a/recipe/patches/0004-Set-PYTHON_INCLUDE_DIR-in-setup.py.patch b/recipe/patches/0004-Set-PYTHON_INCLUDE_DIR-in-setup.py.patch new file mode 100644 index 0000000..573bc0d --- /dev/null +++ b/recipe/patches/0004-Set-PYTHON_INCLUDE_DIR-in-setup.py.patch @@ -0,0 +1,47 @@ +From 12ef16198c3788df61d0de43680eb7c56ddce1d9 Mon Sep 17 00:00:00 2001 +From: Bas Nijholt +Date: Tue, 5 Dec 2023 13:14:23 -0800 +Subject: [PATCH 4/6] Set PYTHON_INCLUDE_DIR in setup.py + +Prevents +``` + CMake Error at /home/bas.nijholt/micromamba/envs/qsim/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message): + Could NOT find PythonLibs (missing: PYTHON_INCLUDE_DIRS) (Required is at + least version "3.7") + Call Stack (most recent call first): + /home/bas.nijholt/micromamba/envs/qsim/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) + /home/bas.nijholt/micromamba/envs/qsim/share/cmake-3.27/Modules/FindPythonLibs.cmake:323 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) + pybind_interface/cuda/CMakeLists.txt:18 (find_package) +``` +--- + setup.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/setup.py b/setup.py +index ed4720c..1cb2ec5 100644 +--- a/setup.py ++++ b/setup.py +@@ -4,6 +4,7 @@ import sys + import shutil + import platform + import subprocess ++import sysconfig + + from setuptools import setup, Extension + from setuptools.command.build_ext import build_ext +@@ -38,10 +39,12 @@ class CMakeBuild(build_ext): + + def build_extension(self, ext): + extdir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.name))) ++ python_include_dir = sysconfig.get_path("include") + cmake_args = [ + "-DCMAKE_CUDA_COMPILER=nvcc", + "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=" + extdir, + "-DPYTHON_EXECUTABLE=" + sys.executable, ++ "-DPYTHON_INCLUDE_DIR=" + python_include_dir, + ] + + cfg = "Debug" if self.debug else "Release" +-- +2.43.0 + diff --git a/recipe/patches/0005-Allow-installing-for-Python-3.12.patch b/recipe/patches/0005-Allow-installing-for-Python-3.12.patch index f057111..a1f81b2 100644 --- a/recipe/patches/0005-Allow-installing-for-Python-3.12.patch +++ b/recipe/patches/0005-Allow-installing-for-Python-3.12.patch @@ -1,7 +1,7 @@ -From dd26233a6b5cdfe36d855c7127cfad9bcdfc9e68 Mon Sep 17 00:00:00 2001 +From 5c47f4d160bb129115643361738dd9170c230a9b Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Thu, 7 Dec 2023 08:54:39 -0800 -Subject: [PATCH] Allow installing for Python 3.12 +Subject: [PATCH 5/6] Allow installing for Python 3.12 I have tested qsim on Python 3.12 and everything works just fine. --- @@ -9,10 +9,10 @@ I have tested qsim on Python 3.12 and everything works just fine. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py -index ed4720c..70ebca4 100644 +index 1cb2ec5..e5ae61f 100644 --- a/setup.py +++ b/setup.py -@@ -114,7 +114,7 @@ setup( +@@ -117,7 +117,7 @@ setup( url="https://github.com/quantumlib/qsim", author="Vamsi Krishna Devabathini", author_email="devabathini92@gmail.com", diff --git a/recipe/patches/0006-Set-CUDA_ARCHITECTURES-all-cmake-policy-CMP0104.patch b/recipe/patches/0006-Set-CUDA_ARCHITECTURES-all-cmake-policy-CMP0104.patch new file mode 100644 index 0000000..6663319 --- /dev/null +++ b/recipe/patches/0006-Set-CUDA_ARCHITECTURES-all-cmake-policy-CMP0104.patch @@ -0,0 +1,84 @@ +From 2a166f63ba5544c86c0961e13300717e5f60db29 Mon Sep 17 00:00:00 2001 +From: Bas Nijholt +Date: Wed, 29 Nov 2023 15:07:28 -0500 +Subject: [PATCH 6/6] Set CUDA_ARCHITECTURES "all" (cmake-policy CMP0104) + +--- + pybind_interface/cuda/CMakeLists.txt | 7 ++++--- + pybind_interface/custatevec/CMakeLists.txt | 4 ++-- + pybind_interface/decide/CMakeLists.txt | 11 ++++++----- + 3 files changed, 12 insertions(+), 10 deletions(-) + +diff --git a/pybind_interface/cuda/CMakeLists.txt b/pybind_interface/cuda/CMakeLists.txt +index d1d4b3f..3a42e9d 100644 +--- a/pybind_interface/cuda/CMakeLists.txt ++++ b/pybind_interface/cuda/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.11) ++cmake_minimum_required(VERSION 3.18) + project(qsim LANGUAGES CXX CUDA) + + if(WIN32) +@@ -27,8 +27,9 @@ endif() + + cuda_add_library(qsim_cuda MODULE pybind_main_cuda.cpp) + set_target_properties(qsim_cuda PROPERTIES +- PREFIX "${PYTHON_MODULE_PREFIX}" +- SUFFIX "${PYTHON_MODULE_EXTENSION}" ++ CUDA_ARCHITECTURES "all" ++ PREFIX "${PYTHON_MODULE_PREFIX}" ++ SUFFIX "${PYTHON_MODULE_EXTENSION}" + ) + set_source_files_properties(pybind_main_cuda.cpp PROPERTIES LANGUAGE CUDA) + +diff --git a/pybind_interface/custatevec/CMakeLists.txt b/pybind_interface/custatevec/CMakeLists.txt +index 8c1d387..acc4347 100644 +--- a/pybind_interface/custatevec/CMakeLists.txt ++++ b/pybind_interface/custatevec/CMakeLists.txt +@@ -40,8 +40,8 @@ cuda_add_library(qsim_custatevec MODULE pybind_main_custatevec.cpp) + target_link_libraries(qsim_custatevec -lcustatevec -lcublas) + + set_target_properties(qsim_custatevec PROPERTIES +- PREFIX "${PYTHON_MODULE_PREFIX}" +- SUFFIX "${PYTHON_MODULE_EXTENSION}" ++ PREFIX "${PYTHON_MODULE_PREFIX}" ++ SUFFIX "${PYTHON_MODULE_EXTENSION}" + ) + set_source_files_properties(pybind_main_custatevec.cpp PROPERTIES LANGUAGE CUDA) + +diff --git a/pybind_interface/decide/CMakeLists.txt b/pybind_interface/decide/CMakeLists.txt +index 6b36282..3720678 100644 +--- a/pybind_interface/decide/CMakeLists.txt ++++ b/pybind_interface/decide/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.11) ++cmake_minimum_required(VERSION 3.18) + + if(WIN32) + set(CMAKE_CXX_FLAGS "/O2 /openmp") +@@ -26,8 +26,9 @@ if(has_nvcc) + find_package(Python3 3.7 REQUIRED COMPONENTS Interpreter Development) + include_directories(${PYTHON_INCLUDE_DIRS} ${pybind11_SOURCE_DIR}/include) + set_target_properties(qsim_decide PROPERTIES +- PREFIX "${PYTHON_MODULE_PREFIX}" +- SUFFIX "${PYTHON_MODULE_EXTENSION}" ++ CUDA_ARCHITECTURES "all" ++ PREFIX "${PYTHON_MODULE_PREFIX}" ++ SUFFIX "${PYTHON_MODULE_EXTENSION}" + ) + set_source_files_properties(decide.cpp PROPERTIES LANGUAGE CUDA) + target_link_libraries(qsim_decide OpenMP::OpenMP_CXX) +@@ -39,8 +40,8 @@ elseif(has_hipcc) + find_package(Python3 3.7 REQUIRED COMPONENTS Interpreter Development) + include_directories(${PYTHON_INCLUDE_DIRS} ${pybind11_SOURCE_DIR}/include) + set_target_properties(qsim_decide PROPERTIES +- PREFIX "${PYTHON_MODULE_PREFIX}" +- SUFFIX "${PYTHON_MODULE_EXTENSION}" ++ PREFIX "${PYTHON_MODULE_PREFIX}" ++ SUFFIX "${PYTHON_MODULE_EXTENSION}" + ) + target_link_libraries(qsim_decide PUBLIC OpenMP::OpenMP_CXX) + else() +-- +2.43.0 + diff --git a/recipe/patches/0007-Always-skip-test_cirq_qsim_gpu_amplitudes-because-no.patch b/recipe/patches/0007-Always-skip-test_cirq_qsim_gpu_amplitudes-because-no.patch new file mode 100644 index 0000000..f3585b2 --- /dev/null +++ b/recipe/patches/0007-Always-skip-test_cirq_qsim_gpu_amplitudes-because-no.patch @@ -0,0 +1,27 @@ +From d6ba9820c5ec730a22b90fd5e4902d6b5b49cbfb Mon Sep 17 00:00:00 2001 +From: Bas Nijholt +Date: Thu, 7 Dec 2023 17:38:14 -0800 +Subject: [PATCH 7/7] Always skip test_cirq_qsim_gpu_amplitudes because no GPU + in CI + +--- + qsimcirq_tests/qsimcirq_test.py | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/qsimcirq_tests/qsimcirq_test.py b/qsimcirq_tests/qsimcirq_test.py +index 40d0c26..d315b5d 100644 +--- a/qsimcirq_tests/qsimcirq_test.py ++++ b/qsimcirq_tests/qsimcirq_test.py +@@ -1309,8 +1309,7 @@ def test_qsim_gpu_unavailable(): + + + def test_cirq_qsim_gpu_amplitudes(): +- if qsimcirq.qsim_gpu is None: +- pytest.skip("GPU is not available for testing.") ++ pytest.skip("GPU is not available for testing.") + # Pick qubits. + a, b = [cirq.GridQubit(0, 0), cirq.GridQubit(0, 1)] + +-- +2.43.0 +
VariantStatus
linux_64_numpy1.22python3.10.____cpythonlinux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.22python3.10.____cpython - variant + variant
linux_64_numpy1.22python3.8.____cpythonlinux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.22python3.8.____cpython - variant + variant
linux_64_numpy1.22python3.9.____cpythonlinux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.22python3.9.____cpython - variant + variant
linux_64_numpy1.23python3.11.____cpythonlinux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.23python3.11.____cpython - variant + variant
linux_64_numpy1.26python3.12.____cpythonlinux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.26python3.12.____cpython - variant + variant + +
linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.22python3.10.____cpython + + variant + +
linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.22python3.8.____cpython + + variant + +
linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.22python3.9.____cpython + + variant + +
linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.23python3.11.____cpython + + variant + +
linux_64_c_compiler_version12cuda_compiler_versionNonecxx_compiler_version12numpy1.26python3.12.____cpython + + variant