diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 84ba2acb..4773a438 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -54,6 +54,7 @@ jobs: CONFIG: osx_arm64_numpy1.26python3.12.____cpython UPLOAD_PACKAGES: 'True' timeoutInMinutes: 360 + variables: {} steps: # TODO: Fast finish on azure pipelines? diff --git a/.ci_support/linux_64_blas_implgenericc_compiler_version10cuda_compilernvcccuda_compiler_version11.2cxx_compiler_version10.yaml b/.ci_support/linux_64_blas_implgenericc_compiler_version10cuda_compilernvcccuda_compiler_version11.2cxx_compiler_version10.yaml index 7f99e763..6e7f2304 100644 --- a/.ci_support/linux_64_blas_implgenericc_compiler_version10cuda_compilernvcccuda_compiler_version11.2cxx_compiler_version10.yaml +++ b/.ci_support/linux_64_blas_implgenericc_compiler_version10cuda_compilernvcccuda_compiler_version11.2cxx_compiler_version10.yaml @@ -59,9 +59,9 @@ target_platform: zip_keys: - - c_compiler_version - cxx_compiler_version + - cdt_name - cuda_compiler - cuda_compiler_version - - cdt_name - docker_image - - github_actions_labels - blas_impl diff --git a/.ci_support/linux_64_blas_implgenericc_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11.yaml b/.ci_support/linux_64_blas_implgenericc_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11.yaml index 1ce893a6..7889ffa0 100644 --- a/.ci_support/linux_64_blas_implgenericc_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11.yaml +++ b/.ci_support/linux_64_blas_implgenericc_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11.yaml @@ -59,9 +59,9 @@ target_platform: zip_keys: - - c_compiler_version - cxx_compiler_version + - cdt_name - cuda_compiler - cuda_compiler_version - - cdt_name - docker_image - - github_actions_labels - blas_impl diff --git a/.ci_support/linux_64_blas_implgenericc_compiler_version12cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version12.yaml b/.ci_support/linux_64_blas_implgenericc_compiler_version12cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version12.yaml index 735d0d76..5ecbe1fb 100644 --- a/.ci_support/linux_64_blas_implgenericc_compiler_version12cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version12.yaml +++ b/.ci_support/linux_64_blas_implgenericc_compiler_version12cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version12.yaml @@ -59,9 +59,9 @@ target_platform: zip_keys: - - c_compiler_version - cxx_compiler_version + - cdt_name - cuda_compiler - cuda_compiler_version - - cdt_name - docker_image - - github_actions_labels - blas_impl diff --git a/.ci_support/linux_64_blas_implgenericc_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml b/.ci_support/linux_64_blas_implgenericc_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml index 4a8deb83..8bd0c8b0 100644 --- a/.ci_support/linux_64_blas_implgenericc_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml +++ b/.ci_support/linux_64_blas_implgenericc_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml @@ -59,9 +59,9 @@ target_platform: zip_keys: - - c_compiler_version - cxx_compiler_version + - cdt_name - cuda_compiler - cuda_compiler_version - - cdt_name - docker_image - - github_actions_labels - blas_impl diff --git a/.ci_support/linux_64_blas_implmklc_compiler_version10cuda_compilernvcccuda_compiler_version11.2cxx_compiler_version10.yaml b/.ci_support/linux_64_blas_implmklc_compiler_version10cuda_compilernvcccuda_compiler_version11.2cxx_compiler_version10.yaml index 82c0b344..a86e13a6 100644 --- a/.ci_support/linux_64_blas_implmklc_compiler_version10cuda_compilernvcccuda_compiler_version11.2cxx_compiler_version10.yaml +++ b/.ci_support/linux_64_blas_implmklc_compiler_version10cuda_compilernvcccuda_compiler_version11.2cxx_compiler_version10.yaml @@ -59,9 +59,9 @@ target_platform: zip_keys: - - c_compiler_version - cxx_compiler_version + - cdt_name - cuda_compiler - cuda_compiler_version - - cdt_name - docker_image - - github_actions_labels - blas_impl diff --git a/.ci_support/linux_64_blas_implmklc_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11.yaml b/.ci_support/linux_64_blas_implmklc_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11.yaml index 97e61133..d103dd84 100644 --- a/.ci_support/linux_64_blas_implmklc_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11.yaml +++ b/.ci_support/linux_64_blas_implmklc_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11.yaml @@ -59,9 +59,9 @@ target_platform: zip_keys: - - c_compiler_version - cxx_compiler_version + - cdt_name - cuda_compiler - cuda_compiler_version - - cdt_name - docker_image - - github_actions_labels - blas_impl diff --git a/.ci_support/linux_64_blas_implmklc_compiler_version12cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version12.yaml b/.ci_support/linux_64_blas_implmklc_compiler_version12cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version12.yaml index b603f213..7619452b 100644 --- a/.ci_support/linux_64_blas_implmklc_compiler_version12cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version12.yaml +++ b/.ci_support/linux_64_blas_implmklc_compiler_version12cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version12.yaml @@ -59,9 +59,9 @@ target_platform: zip_keys: - - c_compiler_version - cxx_compiler_version + - cdt_name - cuda_compiler - cuda_compiler_version - - cdt_name - docker_image - - github_actions_labels - blas_impl diff --git a/.ci_support/linux_64_blas_implmklc_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml b/.ci_support/linux_64_blas_implmklc_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml index 4e84358d..a1671a90 100644 --- a/.ci_support/linux_64_blas_implmklc_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml +++ b/.ci_support/linux_64_blas_implmklc_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml @@ -59,9 +59,9 @@ target_platform: zip_keys: - - c_compiler_version - cxx_compiler_version + - cdt_name - cuda_compiler - cuda_compiler_version - - cdt_name - docker_image - - github_actions_labels - blas_impl diff --git a/.ci_support/linux_aarch64_c_compiler_version10cuda_compilernvcccuda_compiler_version11.2cxx_compiler_version10.yaml b/.ci_support/linux_aarch64_c_compiler_version10cuda_compilernvcccuda_compiler_version11.2cxx_compiler_version10.yaml new file mode 100644 index 00000000..4787c866 --- /dev/null +++ b/.ci_support/linux_aarch64_c_compiler_version10cuda_compilernvcccuda_compiler_version11.2cxx_compiler_version10.yaml @@ -0,0 +1,73 @@ +BUILD: +- aarch64-conda_cos7-linux-gnu +blas_impl: +- generic +c_compiler: +- gcc +c_compiler_version: +- '10' +cdt_arch: +- aarch64 +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- nvcc +cuda_compiler_version: +- '11.2' +cudnn: +- '8' +cxx_compiler: +- gxx +cxx_compiler_version: +- '10' +docker_image: +- quay.io/condaforge/linux-anvil-cuda:11.2 +github_actions_labels: +- cirun-openstack-cpu-large +libcblas: +- 3.9 *netlib +liblapack: +- 3.9 *netlib +libprotobuf: +- 4.25.1 +megabuild: +- 'true' +mkl: +- '2023' +nccl: +- '2' +numpy: +- '1.22' +- '1.23' +- '1.26' +- '1.22' +- '1.22' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.10.* *_cpython +- 3.11.* *_cpython +- 3.12.* *_cpython +- 3.8.* *_cpython +- 3.9.* *_cpython +pytorch: +- '2.1' +target_platform: +- linux-aarch64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version + - cdt_name + - cuda_compiler + - cuda_compiler_version + - docker_image +- - github_actions_labels + - blas_impl +- - python + - numpy diff --git a/.ci_support/linux_aarch64_c_compiler_version12cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version12.yaml b/.ci_support/linux_aarch64_c_compiler_version12cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version12.yaml index 0efab2f0..4e54d143 100644 --- a/.ci_support/linux_aarch64_c_compiler_version12cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version12.yaml +++ b/.ci_support/linux_aarch64_c_compiler_version12cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version12.yaml @@ -18,6 +18,8 @@ cuda_compiler: - None cuda_compiler_version: - None +cudnn: +- '8' cxx_compiler: - gxx cxx_compiler_version: @@ -36,6 +38,8 @@ megabuild: - 'true' mkl: - '2023' +nccl: +- '2' numpy: - '1.22' - '1.23' @@ -59,9 +63,9 @@ target_platform: zip_keys: - - c_compiler_version - cxx_compiler_version + - cdt_name - cuda_compiler - cuda_compiler_version - - cdt_name - docker_image - - github_actions_labels - blas_impl diff --git a/.ci_support/linux_aarch64_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml b/.ci_support/linux_aarch64_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml new file mode 100644 index 00000000..2df33e85 --- /dev/null +++ b/.ci_support/linux_aarch64_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12.yaml @@ -0,0 +1,73 @@ +BUILD: +- aarch64-conda_cos7-linux-gnu +blas_impl: +- generic +c_compiler: +- gcc +c_compiler_version: +- '12' +cdt_arch: +- aarch64 +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- cuda-nvcc +cuda_compiler_version: +- '12.0' +cudnn: +- '8' +cxx_compiler: +- gxx +cxx_compiler_version: +- '12' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +github_actions_labels: +- cirun-openstack-cpu-large +libcblas: +- 3.9 *netlib +liblapack: +- 3.9 *netlib +libprotobuf: +- 4.25.1 +megabuild: +- 'true' +mkl: +- '2023' +nccl: +- '2' +numpy: +- '1.22' +- '1.23' +- '1.26' +- '1.22' +- '1.22' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.10.* *_cpython +- 3.11.* *_cpython +- 3.12.* *_cpython +- 3.8.* *_cpython +- 3.9.* *_cpython +pytorch: +- '2.1' +target_platform: +- linux-aarch64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version + - cdt_name + - cuda_compiler + - cuda_compiler_version + - docker_image +- - github_actions_labels + - blas_impl +- - python + - numpy diff --git a/.ci_support/migrations/cuda120.yaml b/.ci_support/migrations/cuda120.yaml index 7e6ee1c3..9f23a0b3 100644 --- a/.ci_support/migrations/cuda120.yaml +++ b/.ci_support/migrations/cuda120.yaml @@ -3,7 +3,7 @@ __migrator: kind: version migration_number: - 2 + 3 build_number: 1 paused: false @@ -36,6 +36,8 @@ __migrator: - quay.io/condaforge/linux-anvil-cuda:10.2 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] - quay.io/condaforge/linux-anvil-cuda:11.0 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] - quay.io/condaforge/linux-anvil-cuda:11.1 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + + # case: CUDA 11.2 - quay.io/condaforge/linux-anvil-cuda:11.2 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] # case: native compilation (build == target) - quay.io/condaforge/linux-anvil-ppc64le-cuda:11.2 # [ppc64le and os.environ.get("BUILD_PLATFORM") == "linux-ppc64le"] @@ -43,19 +45,29 @@ __migrator: # case: cross-compilation (build != target) - quay.io/condaforge/linux-anvil-cuda:11.2 # [ppc64le and os.environ.get("BUILD_PLATFORM") == "linux-64"] - quay.io/condaforge/linux-anvil-cuda:11.2 # [aarch64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + + # case: CUDA 11.8 + - quay.io/condaforge/linux-anvil-cuda:11.8 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + # case: native compilation (build == target) + - quay.io/condaforge/linux-anvil-ppc64le-cuda:11.8 # [ppc64le and os.environ.get("BUILD_PLATFORM") == "linux-ppc64le"] + - quay.io/condaforge/linux-anvil-aarch64-cuda:11.8 # [aarch64 and os.environ.get("BUILD_PLATFORM") == "linux-aarch64"] + # case: cross-compilation (build != target) + - quay.io/condaforge/linux-anvil-cuda:11.8 # [ppc64le and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:11.8 # [aarch64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + # case: non-CUDA builds - quay.io/condaforge/linux-anvil-cos7-x86_64 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] cuda_compiler_version: - None - - 10.2 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 11.0 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 11.1 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 11.2 # [(linux or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 11.8 # [(linux or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 12.0 # [(linux or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 10.2 # [(linux64 or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 11.0 # [(linux64 or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 11.1 # [(linux64 or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 11.2 # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 11.8 # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 12.0 # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] commit_message: | - Rebuild for CUDA 12 w/arch support - + Rebuild for CUDA 12 w/arch + Windows support + The transition to CUDA 12 SDK includes new packages for all CUDA libraries and build tools. Notably, the cudatoolkit package no longer exists, and packages should depend directly on the specific CUDA libraries (libcublas, libcusolver, @@ -63,11 +75,11 @@ __migrator: [see this issue]( https://github.com/conda-forge/conda-forge.github.io/issues/1963 ). Please feel free to raise any issues encountered there. Thank you! :pray: -cuda_compiler: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - cuda-nvcc # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] +cuda_compiler: # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - cuda-nvcc # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] -cuda_compiler_version: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 12.0 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] +cuda_compiler_version: # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 12.0 # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] c_compiler_version: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - 12 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] @@ -78,6 +90,9 @@ cxx_compiler_version: # [linux and os.environ.get("CF_CUDA_ENABLED", "F fortran_compiler_version: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - 12 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] +c_stdlib_version: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 2.17 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + cdt_name: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - cos7 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] diff --git a/.ci_support/migrations/libgrpc159_libprotobuf4244.yaml b/.ci_support/migrations/libgrpc159_libprotobuf4244.yaml deleted file mode 100644 index 8a51b6ed..00000000 --- a/.ci_support/migrations/libgrpc159_libprotobuf4244.yaml +++ /dev/null @@ -1,16 +0,0 @@ -__migrator: - build_number: 1 - kind: version - migration_number: 1 - exclude: - # this shouldn't attempt to modify the python feedstocks - - protobuf -libgrpc: -- "1.59" -libprotobuf: -- 4.24.4 -# already covered by libabseil20230802_libgrpc157_libprotobuf4234, -# which we cannot delete yet, but keep for clarity -MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64] -- "10.13" # [osx and x86_64] -migrator_ts: 1698833751.21557 diff --git a/.ci_support/migrations/libprotobuf4251.yaml b/.ci_support/migrations/libprotobuf4251.yaml deleted file mode 100644 index 39478f0d..00000000 --- a/.ci_support/migrations/libprotobuf4251.yaml +++ /dev/null @@ -1,10 +0,0 @@ -__migrator: - build_number: 1 - commit_message: Rebuild for libprotobuf 4.25.1 - kind: version - migration_number: 1 -libgrpc: -- "1.60" -libprotobuf: -- 4.25.1 -migrator_ts: 1705841975.2201185 diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index 40440fc1..46db0733 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -65,15 +65,30 @@ jobs: runs_on: ['cirun-openstack-gpu-large--${{ github.run_id }}-linux_64_blas_implmklc_compiler_ver_h46f1704d51', 'linux', 'x64', 'self-hosted'] DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 CONDA_FORGE_DOCKER_RUN_ARGS: "--gpus all" + - CONFIG: linux_aarch64_c_compiler_version10cuda_compilernvcccuda_compiler_version11.2cxx_compiler_version10 + UPLOAD_PACKAGES: True + os: ubuntu + runs_on: ['cirun-openstack-cpu-large--${{ github.run_id }}-linux_aarch64_c_compiler_version10c_hb0ea797ce5', 'linux', 'x64', 'self-hosted'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cuda:11.2 + - CONFIG: linux_aarch64_c_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11 + UPLOAD_PACKAGES: True + os: ubuntu + runs_on: ['cirun-openstack-cpu-large--${{ github.run_id }}-linux_aarch64_c_compiler_version11c_h16465f209e', 'linux', 'x64', 'self-hosted'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cuda:11.8 - CONFIG: linux_aarch64_c_compiler_version12cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version12 UPLOAD_PACKAGES: True os: ubuntu runs_on: ['cirun-openstack-cpu-large--${{ github.run_id }}-linux_aarch64_c_compiler_version12c_h07c7302bdb', 'linux', 'x64', 'self-hosted'] DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + - CONFIG: linux_aarch64_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12 + UPLOAD_PACKAGES: True + os: ubuntu + runs_on: ['cirun-openstack-cpu-large--${{ github.run_id }}-linux_aarch64_c_compiler_version12c_h235c88ac5f', 'linux', 'x64', 'self-hosted'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build on Linux if: matrix.os == 'ubuntu' diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 6c188850..a98b9344 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -34,9 +34,9 @@ CONDARC export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa py-lief=0.12.3 conda-forge-ci-setup=3 + pip mamba conda-build py-lief=0.12.3 conda-forge-ci-setup=3 mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa py-lief=0.12.3 conda-forge-ci-setup=3 + pip mamba conda-build py-lief=0.12.3 conda-forge-ci-setup=3 # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -68,7 +68,7 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else - conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + conda-build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index dc7de7dc..6aa5389d 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -26,9 +26,9 @@ export CONDA_SOLVER="libmamba" export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa py-lief=0.12.3 conda-forge-ci-setup=3 + pip mamba conda-build py-lief=0.12.3 conda-forge-ci-setup=3 mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa py-lief=0.12.3 conda-forge-ci-setup=3 + pip mamba conda-build py-lief=0.12.3 conda-forge-ci-setup=3 @@ -81,7 +81,7 @@ else EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" fi - conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml \ + conda-build ./recipe -m ./.ci_support/${CONFIG}.yaml \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file ./.ci_support/clobber_${CONFIG}.yaml \ --extra-meta flow_run_id="$flow_run_id" remote_url="$remote_url" sha="$sha" diff --git a/README.md b/README.md index a165c9b3..91cf68a7 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,13 @@ Current build status variant + + linux_aarch64_c_compiler_version10cuda_compilernvcccuda_compiler_version11.2cxx_compiler_version10 + + + variant + + linux_aarch64_c_compiler_version12cuda_compilerNonecuda_compiler_versionNonecxx_compiler_version12 @@ -89,6 +96,13 @@ Current build status variant + + linux_aarch64_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12 + + + variant + + osx_64_blas_implgenericnumpy1.22python3.10.____cpython diff --git a/build-locally.py b/build-locally.py index 3f4b7a79..e0d408d0 100755 --- a/build-locally.py +++ b/build-locally.py @@ -64,8 +64,9 @@ def verify_config(ns): elif ns.config.startswith("osx"): if "OSX_SDK_DIR" not in os.environ: raise RuntimeError( - "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=SDKs' " - "to download the SDK automatically to 'SDKs/MacOSX.sdk'. " + "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=$PWD/SDKs' " + "to download the SDK automatically to '$PWD/SDKs/MacOSX.sdk'. " + "Note: OSX_SDK_DIR must be set to an absolute path. " "Setting this variable implies agreement to the licensing terms of the SDK by Apple." ) diff --git a/recipe/build.sh b/recipe/build.sh index ad92fe95..3f6bf169 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -123,6 +123,13 @@ elif [[ ${cuda_compiler_version} != "None" ]]; then # with no NVIDIA GPUs. However compilation fails with mkldnn and cuda enabled. export USE_MKLDNN=OFF export USE_CUDA=1 + # PyTorch Vendors an old version of FindCUDA + # https://gitlab.kitware.com/cmake/cmake/-/blame/master/Modules/FindCUDA.cmake#L891 + # They are working on updating it pytorch/pytorch#76082 + # See: https://github.com/conda-forge/pytorch-cpu-feedstock/pull/224#discussion_r1522698939 + if [[ "${target_platform}" != "${build_platform}" ]]; then + export CUDA_TOOLKIT_ROOT=${CUDA_HOME} + fi if [[ ${cuda_compiler_version} == 9.0* ]]; then export TORCH_CUDA_ARCH_LIST="3.5;5.0;6.0;7.0+PTX" export CUDA_TOOLKIT_ROOT_DIR=$CUDA_HOME @@ -148,6 +155,9 @@ elif [[ ${cuda_compiler_version} != "None" ]]; then export TORCH_CUDA_ARCH_LIST="5.0;6.0;6.1;7.0;7.5;8.0;8.6;8.9;9.0+PTX" # $CUDA_HOME not set in CUDA 12.0. Using $PREFIX export CUDA_TOOLKIT_ROOT_DIR="${PREFIX}" + if [[ "${target_platform}" != "${build_platform}" ]]; then + export CUDA_TOOLKIT_ROOT=${PREFIX} + fi else echo "unsupported cuda version. edit build_pytorch.sh" exit 1 diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 81a68e5e..b978d6b2 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set version = "2.1.2" %} -{% set build = 2 %} +{% set build = 3 %} {% if cuda_compiler_version != "None" %} {% set build = build + 200 %} @@ -29,11 +29,13 @@ source: # https://github.com/conda-forge/pytorch-cpu-feedstock/pull/203#issuecomment-1797352452 # https://github.com/pytorch/pytorch/pull/82695/files#diff-8e5cb190cc46be808993381a31fe9c027705d356b6bc0460368c0310ae82b273R61-R66 # https://github.com/pytorch/pytorch/pull/108932 - - patches/0001-Allow-splayed-layouts.patch # [cuda_compiler_version == "12.0"] + # cross compiling CUDA also needs to delete the check + - patches/0001-Allow-splayed-layouts.patch # [cuda_compiler_version == "12.0" or (build_platform != target_platform and cuda_compiler_version != "None")] # https://github.com/pytorch/pytorch/issues/101135 # the following patch was transcribed to work wit 2.1.0 # https://gist.github.com/andreigh/f78f631e0039f0af410b269acbb0c8dc - patches/nvtoolsext.patch # [cuda_compiler_version == "12.0"] + - patches/0002-fix-FindCUDA.patch # [build_platform != target_platform and cuda_compiler_version != "None"] build: number: {{ build }} @@ -50,10 +52,13 @@ build: - python * # [megabuild] - numpy * # [megabuild] skip: true # [win] - skip: true # [cuda_compiler_version != "None" and blas_impl != "mkl"] + skip: true # [cuda_compiler_version != "None" and linux64 and blas_impl != "mkl"] skip: true # [cuda_compiler_version == "10.2"] skip: true # [cuda_compiler_version == "11.0"] skip: true # [cuda_compiler_version == "11.1"] + # 2024/04 This build seems to fail due to disk space on the CIs + # We can potentially re-enable it at a later time + skip: true # [cuda_compiler_version == "11.8" and aarch64] requirements: # Keep this list synchronized (except for python*, numpy*) in outputs @@ -165,7 +170,7 @@ outputs: run_exports: - {{ pin_subpackage('pytorch', max_pin='x.x') }} skip: true # [win] - skip: true # [cuda_compiler_version != "None" and blas_impl != "mkl"] + skip: true # [cuda_compiler_version != "None" and linux64 and blas_impl != "mkl"] skip: true # [cuda_compiler_version == "10.2"] skip: true # [cuda_compiler_version == "11.0"] skip: true # [cuda_compiler_version == "11.1"] @@ -288,19 +293,19 @@ outputs: - expecttest - xmlrunner imports: - - torch + - torch # [not (aarch64 and cuda_compiler_version != "None")] source_files: - test # tools/ is needed to optimise test run # as of pytorch=2.0.0, there is a bug when trying to run tests without the tools - tools commands: - - OMP_NUM_THREADS=4 python ./test/run_test.py || true # [not win] + - OMP_NUM_THREADS=4 python ./test/run_test.py || true # [not win and not (aarch64 and cuda_compiler_version != "None")] - python ./test/run_test.py # [win] # Run pip check so as to ensure that all pytorch packages are installed # https://github.com/conda-forge/pytorch-cpu-feedstock/issues/24 - pip check - - python -c "import torch; print(torch.__version__)" + - python -c "import torch; print(torch.__version__)" # [not (aarch64 and cuda_compiler_version != "None")] - python -c "import torch; assert torch.backends.mkldnn.m.is_available()" # [x86 and cuda_compiler_version == "None"] # At conda-forge, we target versions of OSX that are too old for MPS support # But if users install a newer version of OSX, they will have MPS support @@ -324,7 +329,9 @@ outputs: - {{ pin_subpackage("pytorch", exact=True) }} test: imports: - - torch + # Throws OSError. See comments in: #224 + # It may not be resolved until glibc 2.28 images are ready: conda-forge/conda-forge.github.io#1941 + - torch # [not (aarch64 and cuda_compiler_version != "None")] about: home: https://pytorch.org/ diff --git a/recipe/patches/0002-fix-FindCUDA.patch b/recipe/patches/0002-fix-FindCUDA.patch new file mode 100644 index 00000000..4961f6c0 --- /dev/null +++ b/recipe/patches/0002-fix-FindCUDA.patch @@ -0,0 +1,33 @@ +From e5204e94a55d5c190b27480a286b18fb6a92425d Mon Sep 17 00:00:00 2001 +From: Jinzhe Zeng +Date: Fri, 8 Mar 2024 20:00:16 -0500 +Subject: [PATCH] fix CMake for Cross Compiling + +--- + cmake/Modules_CUDA_fix/upstream/FindCUDA.cmake | 4 ++-- + cmake/public/cuda.cmake | 5 +++-- + 2 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/cmake/Modules_CUDA_fix/upstream/FindCUDA.cmake b/cmake/Modules_CUDA_fix/upstream/FindCUDA.cmake +index 420ee63cfa..1f009bcc5c 100644 +--- a/cmake/Modules_CUDA_fix/upstream/FindCUDA.cmake ++++ b/cmake/Modules_CUDA_fix/upstream/FindCUDA.cmake +@@ -721,13 +721,13 @@ if(CMAKE_CROSSCOMPILING) + if (ANDROID_ARCH_NAME STREQUAL "arm64") + set(CUDA_TOOLKIT_TARGET_NAME "aarch64-linux-androideabi") + else() +- set(CUDA_TOOLKIT_TARGET_NAME "aarch64-linux") ++ set(CUDA_TOOLKIT_TARGET_NAME "sbsa-linux") + endif (ANDROID_ARCH_NAME STREQUAL "arm64") + endif() + + if (EXISTS "${CUDA_TOOLKIT_ROOT}/targets/${CUDA_TOOLKIT_TARGET_NAME}") + set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT}/targets/${CUDA_TOOLKIT_TARGET_NAME}" CACHE PATH "CUDA Toolkit target location.") +- SET (CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT}) ++ SET (CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT} CACHE PATH "Toolkit location." FORCE) + mark_as_advanced(CUDA_TOOLKIT_TARGET_DIR) + endif() + +-- +2.43.0 +