From 32cae2e551ba818959ba08821ce1f80bc420b02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 25 Nov 2024 20:32:25 +0100 Subject: [PATCH 01/27] MNT: Re-rendered with conda-build 24.9.0, conda-smithy 3.44.7, and conda-forge-pinning 2024.11.25.17.21.37 --- .ci_support/linux_64_python3.10.____cpython.yaml | 2 +- .ci_support/linux_64_python3.11.____cpython.yaml | 2 +- .ci_support/linux_64_python3.12.____cpython.yaml | 2 +- .ci_support/linux_64_python3.13.____cp313.yaml | 2 +- .ci_support/linux_64_python3.9.____cpython.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.ci_support/linux_64_python3.10.____cpython.yaml b/.ci_support/linux_64_python3.10.____cpython.yaml index 73b4ee1..beb7236 100644 --- a/.ci_support/linux_64_python3.10.____cpython.yaml +++ b/.ci_support/linux_64_python3.10.____cpython.yaml @@ -11,7 +11,7 @@ channel_targets: cuda_compiler: - cuda-nvcc cuda_compiler_version: -- '12.6' +- '12.5' cxx_compiler: - gxx cxx_compiler_version: diff --git a/.ci_support/linux_64_python3.11.____cpython.yaml b/.ci_support/linux_64_python3.11.____cpython.yaml index 7edb6a8..ea2d888 100644 --- a/.ci_support/linux_64_python3.11.____cpython.yaml +++ b/.ci_support/linux_64_python3.11.____cpython.yaml @@ -11,7 +11,7 @@ channel_targets: cuda_compiler: - cuda-nvcc cuda_compiler_version: -- '12.6' +- '12.5' cxx_compiler: - gxx cxx_compiler_version: diff --git a/.ci_support/linux_64_python3.12.____cpython.yaml b/.ci_support/linux_64_python3.12.____cpython.yaml index bf648a2..dabc0a2 100644 --- a/.ci_support/linux_64_python3.12.____cpython.yaml +++ b/.ci_support/linux_64_python3.12.____cpython.yaml @@ -11,7 +11,7 @@ channel_targets: cuda_compiler: - cuda-nvcc cuda_compiler_version: -- '12.6' +- '12.5' cxx_compiler: - gxx cxx_compiler_version: diff --git a/.ci_support/linux_64_python3.13.____cp313.yaml b/.ci_support/linux_64_python3.13.____cp313.yaml index 4075acd..3cd312a 100644 --- a/.ci_support/linux_64_python3.13.____cp313.yaml +++ b/.ci_support/linux_64_python3.13.____cp313.yaml @@ -11,7 +11,7 @@ channel_targets: cuda_compiler: - cuda-nvcc cuda_compiler_version: -- '12.6' +- '12.5' cxx_compiler: - gxx cxx_compiler_version: diff --git a/.ci_support/linux_64_python3.9.____cpython.yaml b/.ci_support/linux_64_python3.9.____cpython.yaml index 707f401..098f911 100644 --- a/.ci_support/linux_64_python3.9.____cpython.yaml +++ b/.ci_support/linux_64_python3.9.____cpython.yaml @@ -11,7 +11,7 @@ channel_targets: cuda_compiler: - cuda-nvcc cuda_compiler_version: -- '12.6' +- '12.5' cxx_compiler: - gxx cxx_compiler_version: From 73cb99861103a30ced90c0a11fc32a415600b1dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 16 Dec 2024 19:50:48 +0100 Subject: [PATCH 02/27] Disable building C++ unittests (NFC) Disable building C++ unittests, since they are not run. Furthermore, they cause googletest to be implicitly git cloned (which breaks building with rattler-build). --- recipe/build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipe/build.sh b/recipe/build.sh index cd4e083..e5c4519 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -19,5 +19,9 @@ export TRITON_CUPTI_PATH=$PREFIX export MAX_JOBS=$CPU_COUNT +# the build does not run C++ unittests, and they implicitly fetch gtest +# no easy way of passing this, not really worth a whole patch +sed -i -e '/TRITON_BUILD_UT/s:\bON:OFF:' CMakeLists.txt + cd python $PYTHON -m pip install . -vv From 20a6fb1ffe1fb8a588b21153a4fdb5b610d9a1e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 16 Dec 2024 17:10:38 +0100 Subject: [PATCH 03/27] Convert the recipe to rattler-build Converted using `conda-recipe-manager convert`, with a few hand fixes afterwards. --- conda-forge.yml | 1 + recipe/{meta.yaml => recipe.yaml} | 77 ++++++++++++++++--------------- 2 files changed, 42 insertions(+), 36 deletions(-) rename recipe/{meta.yaml => recipe.yaml} (63%) diff --git a/conda-forge.yml b/conda-forge.yml index 993de48..3a04290 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -4,3 +4,4 @@ github: conda_forge_output_validation: true conda_build: pkg_format: '2' +conda_build_tool: rattler-build diff --git a/recipe/meta.yaml b/recipe/recipe.yaml similarity index 63% rename from recipe/meta.yaml rename to recipe/recipe.yaml index 8e7d03a..f63010f 100644 --- a/recipe/meta.yaml +++ b/recipe/recipe.yaml @@ -1,17 +1,20 @@ -{% set version = "3.1.0" %} -# Triton no longer tags releases, but there are release branches, e.g. -# https://github.com/triton-lang/triton/commits/release/3.1.x/ -# Check if the commit id from Pytorch's latest pinned commit in -# https://github.com/pytorch/pytorch/blob/v{{ pytorch_ver }}/.ci/docker/ci_commit_pins/triton.txt -# can be found on one of those release branches, and use that as the version -{% set git_commit = "5fe38ffd73c2ac6ed6323b554205186696631c6f" %} +schema_version: 1 + +context: + version: 3.1.0 + # Triton no longer tags releases, but there are release branches, e.g. + # https://github.com/triton-lang/triton/commits/release/3.1.x/ + # Check if the commit id from Pytorch's latest pinned commit in + # https://github.com/pytorch/pytorch/blob/v{{ pytorch_ver }}/.ci/docker/ci_commit_pins/triton.txt + # can be found on one of those release branches, and use that as the version + git_commit: 5fe38ffd73c2ac6ed6323b554205186696631c6f package: name: triton - version: {{ version }} + version: ${{ version }} source: - url: https://github.com/openai/triton/archive/{{ git_commit }}.tar.gz + url: https://github.com/openai/triton/archive/${{ git_commit }}.tar.gz sha256: 933babc32b69872efbce05fe8be61129fecf52c724fadea42d8c7b2d10e16ad9 patches: - patches/0001-Remove-Werror-that-cause-false-positive-build-failur.patch @@ -37,16 +40,16 @@ source: build: number: 2 + string: cuda${{ cuda_compiler_version | replace('.', '') }}py${{ CONDA_PY }}h${{ PKG_HASH }}_${{ PKG_BUILDNUM }} # TODO: windows support should be available from next version; # CPU-only support still under development - skip: true # [win or cuda_compiler_version == "None"] - string: cuda{{ cuda_compiler_version | replace('.', '') }}py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} + skip: "win or cuda_compiler_version == \"None\"" requirements: build: - - {{ compiler('cxx') }} - - {{ compiler('cuda') }} - - {{ stdlib('c') }} + - ${{ compiler('cxx') }} + - ${{ compiler('cuda') }} + - ${{ stdlib('c') }} - ninja - cmake - mlir @@ -64,42 +67,44 @@ requirements: run: - python - filelock - - pytorch =*=cuda* + - pytorch * cuda* - lit - cuda-nvcc - cuda-cuobjdump - cuda-cudart - cuda-cupti -test: - imports: - - triton - - triton._C.libtriton - requires: - - pip - - pytest - - scipy - source_files: - - python/test - commands: - - pip check - # test suite essentially depends on availability of a physical GPU, - # see https://github.com/openai/triton/issues/466; - # run a test that does not require a GPU but checks - # if triton.compile() works - - pytest -v python/test/unit/tools/test_aot.py::test_ttgir_to_ptx +tests: + - python: + imports: + - triton + - triton._C.libtriton + pip_check: true + - files: + source: + - python/test/ + requirements: + run: + - pip + - pytest + - scipy + script: + # test suite essentially depends on availability of a physical GPU, + # see https://github.com/openai/triton/issues/466; + # run a test that does not require a GPU but checks + # if triton.compile() works + - pytest -v python/test/unit/tools/test_aot.py::test_ttgir_to_ptx about: - home: https://github.com/openai/triton license: MIT - license_family: MIT license_file: LICENSE summary: Development repository for the Triton language and compiler description: | This is the development repository of Triton, a language and compiler for writing highly efficient custom Deep-Learning primitives. The aim of Triton is to provide an open-source environment to write fast code at higher productivity than CUDA, but also with higher flexibility than other existing DSLs. - doc_url: https://triton-lang.org/ - dev_url: https://github.com/openai/triton + homepage: https://github.com/openai/triton + repository: https://github.com/openai/triton + documentation: https://triton-lang.org/ extra: recipe-maintainers: From 4b18a30ee21f1c04148041e166c065942f33e5a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 16 Dec 2024 17:40:00 +0100 Subject: [PATCH 04/27] MNT: Re-rendered with conda-build 24.11.2, conda-smithy 3.45.0, and conda-forge-pinning 2024.12.15.16.05.58 --- .../linux_64_python3.10.____cpython.yaml | 2 +- .../linux_64_python3.11.____cpython.yaml | 2 +- .../linux_64_python3.12.____cpython.yaml | 2 +- .../linux_64_python3.13.____cp313.yaml | 2 +- .../linux_64_python3.9.____cpython.yaml | 2 +- .scripts/build_steps.sh | 24 ++++++++----------- README.md | 1 - 7 files changed, 15 insertions(+), 20 deletions(-) diff --git a/.ci_support/linux_64_python3.10.____cpython.yaml b/.ci_support/linux_64_python3.10.____cpython.yaml index beb7236..73b4ee1 100644 --- a/.ci_support/linux_64_python3.10.____cpython.yaml +++ b/.ci_support/linux_64_python3.10.____cpython.yaml @@ -11,7 +11,7 @@ channel_targets: cuda_compiler: - cuda-nvcc cuda_compiler_version: -- '12.5' +- '12.6' cxx_compiler: - gxx cxx_compiler_version: diff --git a/.ci_support/linux_64_python3.11.____cpython.yaml b/.ci_support/linux_64_python3.11.____cpython.yaml index ea2d888..7edb6a8 100644 --- a/.ci_support/linux_64_python3.11.____cpython.yaml +++ b/.ci_support/linux_64_python3.11.____cpython.yaml @@ -11,7 +11,7 @@ channel_targets: cuda_compiler: - cuda-nvcc cuda_compiler_version: -- '12.5' +- '12.6' cxx_compiler: - gxx cxx_compiler_version: diff --git a/.ci_support/linux_64_python3.12.____cpython.yaml b/.ci_support/linux_64_python3.12.____cpython.yaml index dabc0a2..bf648a2 100644 --- a/.ci_support/linux_64_python3.12.____cpython.yaml +++ b/.ci_support/linux_64_python3.12.____cpython.yaml @@ -11,7 +11,7 @@ channel_targets: cuda_compiler: - cuda-nvcc cuda_compiler_version: -- '12.5' +- '12.6' cxx_compiler: - gxx cxx_compiler_version: diff --git a/.ci_support/linux_64_python3.13.____cp313.yaml b/.ci_support/linux_64_python3.13.____cp313.yaml index 3cd312a..4075acd 100644 --- a/.ci_support/linux_64_python3.13.____cp313.yaml +++ b/.ci_support/linux_64_python3.13.____cp313.yaml @@ -11,7 +11,7 @@ channel_targets: cuda_compiler: - cuda-nvcc cuda_compiler_version: -- '12.5' +- '12.6' cxx_compiler: - gxx cxx_compiler_version: diff --git a/.ci_support/linux_64_python3.9.____cpython.yaml b/.ci_support/linux_64_python3.9.____cpython.yaml index 098f911..707f401 100644 --- a/.ci_support/linux_64_python3.9.____cpython.yaml +++ b/.ci_support/linux_64_python3.9.____cpython.yaml @@ -11,7 +11,7 @@ channel_targets: cuda_compiler: - cuda-nvcc cuda_compiler_version: -- '12.5' +- '12.6' cxx_compiler: - gxx cxx_compiler_version: diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index f8051ab..2b517d9 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -35,7 +35,7 @@ mv /opt/conda/conda-meta/history /opt/conda/conda-meta/history.$(date +%Y-%m-%d- echo > /opt/conda/conda-meta/history micromamba install --root-prefix ~/.conda --prefix /opt/conda \ --yes --override-channels --channel conda-forge --strict-channel-priority \ - pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" + pip rattler-build conda-forge-ci-setup=4 "conda-build>=24.1" export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 # set up the condarc @@ -57,20 +57,16 @@ if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then fi if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then - if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then - EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" - fi - conda debug "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ - ${EXTRA_CB_OPTIONS:-} \ - --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" - - # Drop into an interactive shell - /bin/bash + echo "rattler-build currently doesn't support debug mode" else - 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:-}" + + rattler-build build --recipe "${RECIPE_ROOT}" \ + -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + ${EXTRA_CB_OPTIONS:-} \ + --target-platform "${HOST_PLATFORM}" \ + --extra-meta flow_run_id="${flow_run_id:-}" \ + --extra-meta remote_url="${remote_url:-}" \ + --extra-meta sha="${sha:-}" ( startgroup "Inspecting artifacts" ) 2> /dev/null # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 diff --git a/README.md b/README.md index 4cf8459..f01ce9a 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,6 @@ Documentation: https://triton-lang.org/ This is the development repository of Triton, a language and compiler for writing highly efficient custom Deep-Learning primitives. The aim of Triton is to provide an open-source environment to write fast code at higher productivity than CUDA, but also with higher flexibility than other existing DSLs. - Current build status ==================== From f60be60be9d7c803e177d5381ad961fa6e296e02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 16 Dec 2024 19:52:35 +0100 Subject: [PATCH 05/27] Bump build number --- recipe/recipe.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/recipe.yaml b/recipe/recipe.yaml index f63010f..d3d5c6a 100644 --- a/recipe/recipe.yaml +++ b/recipe/recipe.yaml @@ -39,7 +39,7 @@ source: - patches/0010-Use-system-PATH-to-find-tools-in-CONDA_PREFIX.patch build: - number: 2 + number: 3 string: cuda${{ cuda_compiler_version | replace('.', '') }}py${{ CONDA_PY }}h${{ PKG_HASH }}_${{ PKG_BUILDNUM }} # TODO: windows support should be available from next version; # CPU-only support still under development From 3d486461beaab0adf58d1492551edea47a7ae34f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Wed, 18 Dec 2024 14:32:24 +0100 Subject: [PATCH 06/27] Remove schema_version No clue why `conda-recipe-manager convert` adds that, but the linter does not like it. --- recipe/recipe.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipe/recipe.yaml b/recipe/recipe.yaml index d3d5c6a..2531fce 100644 --- a/recipe/recipe.yaml +++ b/recipe/recipe.yaml @@ -1,5 +1,3 @@ -schema_version: 1 - context: version: 3.1.0 # Triton no longer tags releases, but there are release branches, e.g. From 872facfb4838698280e0f3ba7ff17344b0d752ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Wed, 18 Dec 2024 16:34:36 +0100 Subject: [PATCH 07/27] Fix build string rattler-build uses `${{ hash }}` instead of `${{ PKG_HASH }}`, requires you to pass build number explicitly and construct Python version directly. It also provides a version_to_buildstring filter that replaces the inline substitutions. --- recipe/recipe.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipe/recipe.yaml b/recipe/recipe.yaml index 2531fce..1ac3d41 100644 --- a/recipe/recipe.yaml +++ b/recipe/recipe.yaml @@ -6,6 +6,7 @@ context: # https://github.com/pytorch/pytorch/blob/v{{ pytorch_ver }}/.ci/docker/ci_commit_pins/triton.txt # can be found on one of those release branches, and use that as the version git_commit: 5fe38ffd73c2ac6ed6323b554205186696631c6f + build_number: 3 package: name: triton @@ -37,8 +38,8 @@ source: - patches/0010-Use-system-PATH-to-find-tools-in-CONDA_PREFIX.patch build: - number: 3 - string: cuda${{ cuda_compiler_version | replace('.', '') }}py${{ CONDA_PY }}h${{ PKG_HASH }}_${{ PKG_BUILDNUM }} + number: ${{ build_number }} + string: cuda${{ cuda_compiler_version | version_to_buildstring }}py${{ python | version_to_buildstring }}h${{ hash }}_${{ build_number }} # TODO: windows support should be available from next version; # CPU-only support still under development skip: "win or cuda_compiler_version == \"None\"" From a1affdb5dcb7b220409084d1d5383d7a2ab89661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Thu, 19 Dec 2024 13:21:52 +0100 Subject: [PATCH 08/27] Enable Azure disk space freeing Per https://github.com/conda-forge/triton-feedstock/pull/29#issuecomment-2553626096 --- conda-forge.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conda-forge.yml b/conda-forge.yml index 3a04290..6cc1712 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1,3 +1,5 @@ +azure: + free_disk_space: true github: branch_name: main tooling_branch_name: main From 8764155de35dc4a69d140cb4e83f95b3479e22bc Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 00:59:53 +0000 Subject: [PATCH 09/27] MNT: Re-rendered with conda-build 24.11.2, conda-smithy 3.45.1, and conda-forge-pinning 2024.12.20.00.45.05 --- .azure-pipelines/azure-pipelines-linux.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index d9dc024..a44f210 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -32,6 +32,27 @@ jobs: variables: {} steps: + - script: | + sudo mkdir -p /opt/empty_dir || true + for d in \ + /opt/ghc \ + /opt/hostedtoolcache \ + /usr/lib/jvm \ + /usr/local/.ghcup \ + /usr/local/lib/android \ + /usr/local/share/powershell \ + /usr/share/dotnet \ + /usr/share/swift \ + ; do + sudo rsync --stats -a --delete /opt/empty_dir/ $d || true + done + sudo apt-get purge -y -f firefox \ + google-chrome-stable \ + microsoft-edge-stable + sudo apt-get autoremove -y >& /dev/null + sudo apt-get autoclean -y >& /dev/null + df -h + displayName: Manage disk space # configure qemu binfmt-misc running. This allows us to run docker containers # embedded qemu-static - script: | From 9278eb55170b6ad8841cd05672126f7ae0009ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Fri, 27 Dec 2024 13:54:51 +0100 Subject: [PATCH 10/27] Remove the dependency on pytorch Per the discussion on pytorch-cpu-feedstock: https://github.com/conda-forge/pytorch-cpu-feedstock/issues/166#issuecomment-2562969469 (and below) --- recipe/recipe.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/recipe/recipe.yaml b/recipe/recipe.yaml index 1ac3d41..65a25c7 100644 --- a/recipe/recipe.yaml +++ b/recipe/recipe.yaml @@ -66,7 +66,6 @@ requirements: run: - python - filelock - - pytorch * cuda* - lit - cuda-nvcc - cuda-cuobjdump From 7718a26c49a12e5a7c68f1ec7861c9292c5c4e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 28 Dec 2024 13:03:29 +0100 Subject: [PATCH 11/27] Add setuptools dependency --- recipe/recipe.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/recipe.yaml b/recipe/recipe.yaml index 65a25c7..b005b0a 100644 --- a/recipe/recipe.yaml +++ b/recipe/recipe.yaml @@ -67,6 +67,7 @@ requirements: - python - filelock - lit + - setuptools - cuda-nvcc - cuda-cuobjdump - cuda-cudart From d5faf7a60ea8137e6e5870ae61d0f6b35dc0b6e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 28 Dec 2024 13:03:48 +0100 Subject: [PATCH 12/27] Remove run dependency on lit lit is only used for the C++ test suite. --- recipe/recipe.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/recipe/recipe.yaml b/recipe/recipe.yaml index b005b0a..bcdb0f1 100644 --- a/recipe/recipe.yaml +++ b/recipe/recipe.yaml @@ -66,7 +66,6 @@ requirements: run: - python - filelock - - lit - setuptools - cuda-nvcc - cuda-cuobjdump From 73cf4311e61a1163be3aa89f00741fed722d2539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 28 Dec 2024 16:01:39 +0100 Subject: [PATCH 13/27] Attempt building for Windows Also limiting CI to a single target while I try to get it working. --- recipe/build.bat | 23 +++++++++++++++++++++++ recipe/conda_build_config.yaml | 8 ++++---- recipe/recipe.yaml | 5 ++--- 3 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 recipe/build.bat diff --git a/recipe/build.bat b/recipe/build.bat new file mode 100644 index 0000000..7da3d99 --- /dev/null +++ b/recipe/build.bat @@ -0,0 +1,23 @@ +rem remove outdated vendored headers +del /s %SRC_DIR%/python/triton/third_party + +set JSON_SYSPATH=%PREFIX% +set LLVM_SYSPATH=%PREFIX% +set PYBIND11_SYSPATH=%SP_DIR%/pybind11 + +rem these don't seem to be actually used, but they prevent downloads +set TRITON_PTXAS_PATH=%PREFIX%/bin/ptxas +set TRITON_CUOBJDUMP_PATH=%PREFIX%/bin/cuobjdump +set TRITON_NVDISASM_PATH=%PREFIX%/bin/nvdisasm +set TRITON_CUDACRT_PATH=%PREFIX% +set TRITON_CUDART_PATH=%PREFIX% +set TRITON_CUPTI_PATH=%PREFIX% + +set MAX_JOBS=%CPU_COUNT% + +rem the build does not run C++ unittests, and they implicitly fetch gtest +rem no easy way of passing this, not really worth a whole patch +sed -i -e '/TRITON_BUILD_UT/s:\bON:OFF:' CMakeLists.txt + +cd python +%PYTHON% -m pip install . -vv diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index db95812..a12cac8 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -21,7 +21,7 @@ fortran_compiler_version: # [linux64] - 13 # [linux64] cdt_name: # [linux64] - cos7 # [linux64] -cuda_compiler: # [linux64] - - cuda-nvcc # [linux64] -cuda_compiler_version: # [linux64] - - 12.6 # [linux64] +cuda_compiler: + - cuda-nvcc +cuda_compiler_version: + - 12.6 diff --git a/recipe/recipe.yaml b/recipe/recipe.yaml index bcdb0f1..9c0bcd5 100644 --- a/recipe/recipe.yaml +++ b/recipe/recipe.yaml @@ -40,9 +40,8 @@ source: build: number: ${{ build_number }} string: cuda${{ cuda_compiler_version | version_to_buildstring }}py${{ python | version_to_buildstring }}h${{ hash }}_${{ build_number }} - # TODO: windows support should be available from next version; - # CPU-only support still under development - skip: "win or cuda_compiler_version == \"None\"" + # TODO: CPU-only support still under development + skip: "unix or cuda_compiler_version == \"None\"" requirements: build: From 7fdc4270aa18ab72748e815dae33de178d70c27d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 28 Dec 2024 16:11:56 +0100 Subject: [PATCH 14/27] MNT: Re-rendered with conda-build 24.11.2, conda-smithy 3.45.1, and conda-forge-pinning 2024.12.27.18.01.51 --- .azure-pipelines/azure-pipelines-linux.yml | 81 ---------- .azure-pipelines/azure-pipelines-win.yml | 50 ++++++ ...aml => win_64_python3.10.____cpython.yaml} | 18 +-- ...aml => win_64_python3.11.____cpython.yaml} | 18 +-- ...aml => win_64_python3.12.____cpython.yaml} | 18 +-- ....yaml => win_64_python3.13.____cp313.yaml} | 18 +-- ...yaml => win_64_python3.9.____cpython.yaml} | 18 +-- .scripts/build_steps.sh | 93 ----------- .scripts/run_docker_build.sh | 114 -------------- .scripts/run_win_build.bat | 146 ++++++++++++++++++ README.md | 20 +-- azure-pipelines.yml | 2 +- 12 files changed, 227 insertions(+), 369 deletions(-) delete mode 100755 .azure-pipelines/azure-pipelines-linux.yml create mode 100755 .azure-pipelines/azure-pipelines-win.yml rename .ci_support/{linux_64_python3.10.____cpython.yaml => win_64_python3.10.____cpython.yaml} (62%) rename .ci_support/{linux_64_python3.11.____cpython.yaml => win_64_python3.11.____cpython.yaml} (62%) rename .ci_support/{linux_64_python3.12.____cpython.yaml => win_64_python3.12.____cpython.yaml} (62%) rename .ci_support/{linux_64_python3.13.____cp313.yaml => win_64_python3.13.____cp313.yaml} (61%) rename .ci_support/{linux_64_python3.9.____cpython.yaml => win_64_python3.9.____cpython.yaml} (62%) delete mode 100755 .scripts/build_steps.sh delete mode 100755 .scripts/run_docker_build.sh create mode 100755 .scripts/run_win_build.bat diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml deleted file mode 100755 index a44f210..0000000 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ /dev/null @@ -1,81 +0,0 @@ -# This file was generated automatically from conda-smithy. To update this configuration, -# update the conda-forge.yml and/or the recipe/meta.yaml. -# -*- mode: yaml -*- - -jobs: -- job: linux - pool: - vmImage: ubuntu-latest - strategy: - matrix: - linux_64_python3.10.____cpython: - CONFIG: linux_64_python3.10.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-alma-x86_64:8 - linux_64_python3.11.____cpython: - CONFIG: linux_64_python3.11.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-alma-x86_64:8 - linux_64_python3.12.____cpython: - CONFIG: linux_64_python3.12.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-alma-x86_64:8 - linux_64_python3.13.____cp313: - CONFIG: linux_64_python3.13.____cp313 - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-alma-x86_64:8 - linux_64_python3.9.____cpython: - CONFIG: linux_64_python3.9.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-alma-x86_64:8 - timeoutInMinutes: 360 - variables: {} - - steps: - - script: | - sudo mkdir -p /opt/empty_dir || true - for d in \ - /opt/ghc \ - /opt/hostedtoolcache \ - /usr/lib/jvm \ - /usr/local/.ghcup \ - /usr/local/lib/android \ - /usr/local/share/powershell \ - /usr/share/dotnet \ - /usr/share/swift \ - ; do - sudo rsync --stats -a --delete /opt/empty_dir/ $d || true - done - sudo apt-get purge -y -f firefox \ - google-chrome-stable \ - microsoft-edge-stable - sudo apt-get autoremove -y >& /dev/null - sudo apt-get autoclean -y >& /dev/null - df -h - displayName: Manage disk space - # configure qemu binfmt-misc running. This allows us to run docker containers - # embedded qemu-static - - script: | - docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes - ls /proc/sys/fs/binfmt_misc/ - condition: not(startsWith(variables['CONFIG'], 'linux_64')) - displayName: Configure binfmt_misc - - - script: | - export CI=azure - export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) - export remote_url=$(Build.Repository.Uri) - export sha=$(Build.SourceVersion) - export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME - export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) - if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then - export IS_PR_BUILD="True" - else - export IS_PR_BUILD="False" - fi - .scripts/run_docker_build.sh - displayName: Run docker build - env: - BINSTAR_TOKEN: $(BINSTAR_TOKEN) - FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml new file mode 100755 index 0000000..1985588 --- /dev/null +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -0,0 +1,50 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + +jobs: +- job: win + pool: + vmImage: windows-2022 + strategy: + matrix: + win_64_python3.10.____cpython: + CONFIG: win_64_python3.10.____cpython + UPLOAD_PACKAGES: 'True' + win_64_python3.11.____cpython: + CONFIG: win_64_python3.11.____cpython + UPLOAD_PACKAGES: 'True' + win_64_python3.12.____cpython: + CONFIG: win_64_python3.12.____cpython + UPLOAD_PACKAGES: 'True' + win_64_python3.13.____cp313: + CONFIG: win_64_python3.13.____cp313 + UPLOAD_PACKAGES: 'True' + win_64_python3.9.____cpython: + CONFIG: win_64_python3.9.____cpython + UPLOAD_PACKAGES: 'True' + timeoutInMinutes: 360 + variables: + CONDA_BLD_PATH: D:\\bld\\ + MINIFORGE_HOME: D:\Miniforge + UPLOAD_TEMP: D:\\tmp + + steps: + + - script: | + call ".scripts\run_win_build.bat" + displayName: Run Windows build + env: + MINIFORGE_HOME: $(MINIFORGE_HOME) + CONDA_BLD_PATH: $(CONDA_BLD_PATH) + PYTHONUNBUFFERED: 1 + CONFIG: $(CONFIG) + CI: azure + flow_run_id: azure_$(Build.BuildNumber).$(System.JobAttempt) + remote_url: $(Build.Repository.Uri) + sha: $(Build.SourceVersion) + UPLOAD_PACKAGES: $(UPLOAD_PACKAGES) + UPLOAD_TEMP: $(UPLOAD_TEMP) + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.ci_support/linux_64_python3.10.____cpython.yaml b/.ci_support/win_64_python3.10.____cpython.yaml similarity index 62% rename from .ci_support/linux_64_python3.10.____cpython.yaml rename to .ci_support/win_64_python3.10.____cpython.yaml index 73b4ee1..80676ee 100644 --- a/.ci_support/linux_64_python3.10.____cpython.yaml +++ b/.ci_support/win_64_python3.10.____cpython.yaml @@ -1,9 +1,5 @@ c_stdlib: -- sysroot -c_stdlib_version: -- '2.28' -cdt_name: -- cos7 +- vs channel_sources: - conda-forge channel_targets: @@ -13,11 +9,7 @@ cuda_compiler: cuda_compiler_version: - '12.6' cxx_compiler: -- gxx -cxx_compiler_version: -- '13' -docker_image: -- quay.io/condaforge/linux-anvil-alma-x86_64:8 +- vs2019 libmlir: - '19' llvm: @@ -33,11 +25,9 @@ pin_run_as_build: python: - 3.10.* *_cpython target_platform: -- linux-64 +- win-64 zip_keys: -- - cxx_compiler_version - - cuda_compiler +- - cuda_compiler - cuda_compiler_version - - docker_image zlib: - '1' diff --git a/.ci_support/linux_64_python3.11.____cpython.yaml b/.ci_support/win_64_python3.11.____cpython.yaml similarity index 62% rename from .ci_support/linux_64_python3.11.____cpython.yaml rename to .ci_support/win_64_python3.11.____cpython.yaml index 7edb6a8..30b478a 100644 --- a/.ci_support/linux_64_python3.11.____cpython.yaml +++ b/.ci_support/win_64_python3.11.____cpython.yaml @@ -1,9 +1,5 @@ c_stdlib: -- sysroot -c_stdlib_version: -- '2.28' -cdt_name: -- cos7 +- vs channel_sources: - conda-forge channel_targets: @@ -13,11 +9,7 @@ cuda_compiler: cuda_compiler_version: - '12.6' cxx_compiler: -- gxx -cxx_compiler_version: -- '13' -docker_image: -- quay.io/condaforge/linux-anvil-alma-x86_64:8 +- vs2019 libmlir: - '19' llvm: @@ -33,11 +25,9 @@ pin_run_as_build: python: - 3.11.* *_cpython target_platform: -- linux-64 +- win-64 zip_keys: -- - cxx_compiler_version - - cuda_compiler +- - cuda_compiler - cuda_compiler_version - - docker_image zlib: - '1' diff --git a/.ci_support/linux_64_python3.12.____cpython.yaml b/.ci_support/win_64_python3.12.____cpython.yaml similarity index 62% rename from .ci_support/linux_64_python3.12.____cpython.yaml rename to .ci_support/win_64_python3.12.____cpython.yaml index bf648a2..ed5567f 100644 --- a/.ci_support/linux_64_python3.12.____cpython.yaml +++ b/.ci_support/win_64_python3.12.____cpython.yaml @@ -1,9 +1,5 @@ c_stdlib: -- sysroot -c_stdlib_version: -- '2.28' -cdt_name: -- cos7 +- vs channel_sources: - conda-forge channel_targets: @@ -13,11 +9,7 @@ cuda_compiler: cuda_compiler_version: - '12.6' cxx_compiler: -- gxx -cxx_compiler_version: -- '13' -docker_image: -- quay.io/condaforge/linux-anvil-alma-x86_64:8 +- vs2019 libmlir: - '19' llvm: @@ -33,11 +25,9 @@ pin_run_as_build: python: - 3.12.* *_cpython target_platform: -- linux-64 +- win-64 zip_keys: -- - cxx_compiler_version - - cuda_compiler +- - cuda_compiler - cuda_compiler_version - - docker_image zlib: - '1' diff --git a/.ci_support/linux_64_python3.13.____cp313.yaml b/.ci_support/win_64_python3.13.____cp313.yaml similarity index 61% rename from .ci_support/linux_64_python3.13.____cp313.yaml rename to .ci_support/win_64_python3.13.____cp313.yaml index 4075acd..0f294d7 100644 --- a/.ci_support/linux_64_python3.13.____cp313.yaml +++ b/.ci_support/win_64_python3.13.____cp313.yaml @@ -1,9 +1,5 @@ c_stdlib: -- sysroot -c_stdlib_version: -- '2.28' -cdt_name: -- cos7 +- vs channel_sources: - conda-forge channel_targets: @@ -13,11 +9,7 @@ cuda_compiler: cuda_compiler_version: - '12.6' cxx_compiler: -- gxx -cxx_compiler_version: -- '13' -docker_image: -- quay.io/condaforge/linux-anvil-alma-x86_64:8 +- vs2019 libmlir: - '19' llvm: @@ -33,11 +25,9 @@ pin_run_as_build: python: - 3.13.* *_cp313 target_platform: -- linux-64 +- win-64 zip_keys: -- - cxx_compiler_version - - cuda_compiler +- - cuda_compiler - cuda_compiler_version - - docker_image zlib: - '1' diff --git a/.ci_support/linux_64_python3.9.____cpython.yaml b/.ci_support/win_64_python3.9.____cpython.yaml similarity index 62% rename from .ci_support/linux_64_python3.9.____cpython.yaml rename to .ci_support/win_64_python3.9.____cpython.yaml index 707f401..6a24e33 100644 --- a/.ci_support/linux_64_python3.9.____cpython.yaml +++ b/.ci_support/win_64_python3.9.____cpython.yaml @@ -1,9 +1,5 @@ c_stdlib: -- sysroot -c_stdlib_version: -- '2.28' -cdt_name: -- cos7 +- vs channel_sources: - conda-forge channel_targets: @@ -13,11 +9,7 @@ cuda_compiler: cuda_compiler_version: - '12.6' cxx_compiler: -- gxx -cxx_compiler_version: -- '13' -docker_image: -- quay.io/condaforge/linux-anvil-alma-x86_64:8 +- vs2019 libmlir: - '19' llvm: @@ -33,11 +25,9 @@ pin_run_as_build: python: - 3.9.* *_cpython target_platform: -- linux-64 +- win-64 zip_keys: -- - cxx_compiler_version - - cuda_compiler +- - cuda_compiler - cuda_compiler_version - - docker_image zlib: - '1' diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh deleted file mode 100755 index 2b517d9..0000000 --- a/.scripts/build_steps.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env bash - -# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here -# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent -# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also -# benefit from the improvement. - -# -*- mode: jinja-shell -*- - -set -xeuo pipefail -export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" -source ${FEEDSTOCK_ROOT}/.scripts/logging_utils.sh - - -( endgroup "Start Docker" ) 2> /dev/null - -( startgroup "Configuring conda" ) 2> /dev/null - -export PYTHONUNBUFFERED=1 -export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" -export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" -export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" - -cat >~/.condarc < /opt/conda/conda-meta/history -micromamba install --root-prefix ~/.conda --prefix /opt/conda \ - --yes --override-channels --channel conda-forge --strict-channel-priority \ - pip rattler-build conda-forge-ci-setup=4 "conda-build>=24.1" -export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 - -# set up the condarc -setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" - -source run_conda_forge_build_setup - - - -# make the build number clobber -make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" - - - -( endgroup "Configuring conda" ) 2> /dev/null - -if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then - cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" -fi - -if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then - echo "rattler-build currently doesn't support debug mode" -else - - rattler-build build --recipe "${RECIPE_ROOT}" \ - -m "${CI_SUPPORT}/${CONFIG}.yaml" \ - ${EXTRA_CB_OPTIONS:-} \ - --target-platform "${HOST_PLATFORM}" \ - --extra-meta flow_run_id="${flow_run_id:-}" \ - --extra-meta remote_url="${remote_url:-}" \ - --extra-meta sha="${sha:-}" - ( startgroup "Inspecting artifacts" ) 2> /dev/null - - # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 - command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir "${RECIPE_ROOT}" -m "${CONFIG_FILE}" || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" - - ( endgroup "Inspecting artifacts" ) 2> /dev/null - ( startgroup "Validating outputs" ) 2> /dev/null - - validate_recipe_outputs "${FEEDSTOCK_NAME}" - - ( endgroup "Validating outputs" ) 2> /dev/null - - ( startgroup "Uploading packages" ) 2> /dev/null - - if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then - upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" - fi - - ( endgroup "Uploading packages" ) 2> /dev/null -fi - -( startgroup "Final checks" ) 2> /dev/null - -touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}" \ No newline at end of file diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh deleted file mode 100755 index 00f377a..0000000 --- a/.scripts/run_docker_build.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env bash - -# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here -# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent -# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also -# benefit from the improvement. - -source .scripts/logging_utils.sh - -( startgroup "Configure Docker" ) 2> /dev/null - -set -xeo pipefail - -THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" -PROVIDER_DIR="$(basename $THISDIR)" - -FEEDSTOCK_ROOT="$( cd "$( dirname "$0" )/.." >/dev/null && pwd )" -RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" - -if [ -z ${FEEDSTOCK_NAME} ]; then - export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) -fi - -if [[ "${sha:-}" == "" ]]; then - pushd "${FEEDSTOCK_ROOT}" - sha=$(git rev-parse HEAD) - popd -fi - -docker info - -# In order for the conda-build process in the container to write to the mounted -# volumes, we need to run with the same id as the host machine, which is -# normally the owner of the mounted volumes, or at least has write permission -export HOST_USER_ID=$(id -u) -# Check if docker-machine is being used (normally on OSX) and get the uid from -# the VM -if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then - export HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u) -fi - -ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts" - -if [ -z "$CONFIG" ]; then - set +x - FILES=`ls .ci_support/linux_*` - CONFIGS="" - for file in $FILES; do - CONFIGS="${CONFIGS}'${file:12:-5}' or "; - done - echo "Need to set CONFIG env variable. Value can be one of ${CONFIGS:0:-4}" - exit 1 -fi - -if [ -z "${DOCKER_IMAGE}" ]; then - SHYAML_INSTALLED="$(shyaml -h || echo NO)" - if [ "${SHYAML_INSTALLED}" == "NO" ]; then - echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Trying to parse with coreutils" - DOCKER_IMAGE=$(cat .ci_support/${CONFIG}.yaml | grep '^docker_image:$' -A 1 | tail -n 1 | cut -b 3-) - if [ "${DOCKER_IMAGE}" = "" ]; then - echo "No docker_image entry found in ${CONFIG}. Falling back to quay.io/condaforge/linux-anvil-comp7" - DOCKER_IMAGE="quay.io/condaforge/linux-anvil-comp7" - fi - else - DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 quay.io/condaforge/linux-anvil-comp7 )" - fi -fi - -mkdir -p "$ARTIFACTS" -DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}" -rm -f "$DONE_CANARY" - -# Allow people to specify extra default arguments to `docker run` (e.g. `--rm`) -DOCKER_RUN_ARGS="${CONDA_FORGE_DOCKER_RUN_ARGS}" -if [ -z "${CI}" ]; then - DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" -fi - -( endgroup "Configure Docker" ) 2> /dev/null - -( startgroup "Start Docker" ) 2> /dev/null - -export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" -export IS_PR_BUILD="${IS_PR_BUILD:-False}" -docker pull "${DOCKER_IMAGE}" -docker run ${DOCKER_RUN_ARGS} \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ - -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ - -e CONFIG \ - -e HOST_USER_ID \ - -e UPLOAD_PACKAGES \ - -e IS_PR_BUILD \ - -e GIT_BRANCH \ - -e UPLOAD_ON_BRANCH \ - -e CI \ - -e FEEDSTOCK_NAME \ - -e CPU_COUNT \ - -e BUILD_WITH_CONDA_DEBUG \ - -e BUILD_OUTPUT_ID \ - -e flow_run_id \ - -e remote_url \ - -e sha \ - -e BINSTAR_TOKEN \ - -e FEEDSTOCK_TOKEN \ - -e STAGING_BINSTAR_TOKEN \ - "${DOCKER_IMAGE}" \ - bash \ - "/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh" - -# verify that the end of the script was reached -test -f "$DONE_CANARY" - -# This closes the last group opened in `build_steps.sh` -( endgroup "Final checks" ) 2> /dev/null \ No newline at end of file diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat new file mode 100755 index 0000000..c427860 --- /dev/null +++ b/.scripts/run_win_build.bat @@ -0,0 +1,146 @@ +:: PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here +:: will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent +:: changes to this script, consider a proposal to conda-smithy so that other feedstocks can also +:: benefit from the improvement. + +:: INPUTS (required environment variables) +:: CONFIG: name of the .ci_support/*.yaml file for this job +:: CI: azure, github_actions, or unset +:: MINIFORGE_HOME: where to install the base conda environment +:: UPLOAD_PACKAGES: true or false +:: UPLOAD_ON_BRANCH: true or false + +setlocal enableextensions enabledelayedexpansion + +FOR %%A IN ("%~dp0.") DO SET "REPO_ROOT=%%~dpA" +if "%MINIFORGE_HOME%"=="" set "MINIFORGE_HOME=%USERPROFILE%\Miniforge3" +:: Remove trailing backslash, if present +if "%MINIFORGE_HOME:~-1%"=="\" set "MINIFORGE_HOME=%MINIFORGE_HOME:~0,-1%" +call :start_group "Provisioning base env with micromamba" +set "MAMBA_ROOT_PREFIX=%MINIFORGE_HOME%-micromamba-%RANDOM%" +set "MICROMAMBA_VERSION=1.5.10-0" +set "MICROMAMBA_URL=https://github.com/mamba-org/micromamba-releases/releases/download/%MICROMAMBA_VERSION%/micromamba-win-64" +set "MICROMAMBA_TMPDIR=%TMP%\micromamba-%RANDOM%" +set "MICROMAMBA_EXE=%MICROMAMBA_TMPDIR%\micromamba.exe" + +echo Downloading micromamba %MICROMAMBA_VERSION% +if not exist "%MICROMAMBA_TMPDIR%" mkdir "%MICROMAMBA_TMPDIR%" +certutil -urlcache -split -f "%MICROMAMBA_URL%" "%MICROMAMBA_EXE%" +if !errorlevel! neq 0 exit /b !errorlevel! + +echo Creating environment +call "%MICROMAMBA_EXE%" create --yes --root-prefix "%MAMBA_ROOT_PREFIX%" --prefix "%MINIFORGE_HOME%" ^ + --channel conda-forge ^ + pip rattler-build conda-forge-ci-setup=4 "conda-build>=24.1" +if !errorlevel! neq 0 exit /b !errorlevel! +echo Removing %MAMBA_ROOT_PREFIX% +del /S /Q "%MAMBA_ROOT_PREFIX%" >nul +del /S /Q "%MICROMAMBA_TMPDIR%" >nul +call :end_group + +call :start_group "Configuring conda" + +:: Activate the base conda environment +echo Activating environment +call "%MINIFORGE_HOME%\Scripts\activate.bat" +:: Configure the solver +set "CONDA_SOLVER=libmamba" +if !errorlevel! neq 0 exit /b !errorlevel! +set "CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1" + +:: Set basic configuration +echo Setting up configuration +setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml +if !errorlevel! neq 0 exit /b !errorlevel! +echo Running build setup +CALL run_conda_forge_build_setup + + +if !errorlevel! neq 0 exit /b !errorlevel! + +if EXIST LICENSE.txt ( + echo Copying feedstock license + copy LICENSE.txt "recipe\\recipe-scripts-license.txt" +) + +if NOT [%flow_run_id%] == [] ( + set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --extra-meta flow_run_id=%flow_run_id% --extra-meta remote_url=%remote_url% --extra-meta sha=%sha%" +) + +call :end_group + +:: Build the recipe +echo Building recipe +rattler-build.exe build --recipe "recipe" -m .ci_support\%CONFIG%.yaml %EXTRA_CB_OPTIONS% --target-platform %HOST_PLATFORM% +if !errorlevel! neq 0 exit /b !errorlevel! + +call :start_group "Inspecting artifacts" +:: inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 +WHERE inspect_artifacts >nul 2>nul && inspect_artifacts --recipe-dir ".\recipe" -m .ci_support\%CONFIG%.yaml || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" +call :end_group + +:: Prepare some environment variables for the upload step +if /i "%CI%" == "github_actions" ( + set "FEEDSTOCK_NAME=%GITHUB_REPOSITORY:*/=%" + set "GIT_BRANCH=%GITHUB_REF:refs/heads/=%" + if /i "%GITHUB_EVENT_NAME%" == "pull_request" ( + set "IS_PR_BUILD=True" + ) else ( + set "IS_PR_BUILD=False" + ) + set "TEMP=%RUNNER_TEMP%" +) +if /i "%CI%" == "azure" ( + set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" + set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" + if /i "%BUILD_REASON%" == "PullRequest" ( + set "IS_PR_BUILD=True" + ) else ( + set "IS_PR_BUILD=False" + ) + set "TEMP=%UPLOAD_TEMP%" +) + +:: Validate +call :start_group "Validating outputs" +validate_recipe_outputs "%FEEDSTOCK_NAME%" +if !errorlevel! neq 0 exit /b !errorlevel! +call :end_group + +if /i "%UPLOAD_PACKAGES%" == "true" ( + if /i "%IS_PR_BUILD%" == "false" ( + call :start_group "Uploading packages" + if not exist "%TEMP%\" md "%TEMP%" + set "TMP=%TEMP%" + upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml + if !errorlevel! neq 0 exit /b !errorlevel! + call :end_group + ) +) + +exit + +:: Logging subroutines + +:start_group +if /i "%CI%" == "github_actions" ( + echo ::group::%~1 + exit /b +) +if /i "%CI%" == "azure" ( + echo ##[group]%~1 + exit /b +) +echo %~1 +exit /b + +:end_group +if /i "%CI%" == "github_actions" ( + echo ::endgroup:: + exit /b +) +if /i "%CI%" == "azure" ( + echo ##[endgroup] + exit /b +) +exit /b \ No newline at end of file diff --git a/README.md b/README.md index f01ce9a..cc03d72 100644 --- a/README.md +++ b/README.md @@ -34,38 +34,38 @@ Current build status - + - + - + - + - + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d309e84..879c4a9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,4 +28,4 @@ stages: condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true')) dependsOn: Check jobs: - - template: ./.azure-pipelines/azure-pipelines-linux.yml \ No newline at end of file + - template: ./.azure-pipelines/azure-pipelines-win.yml \ No newline at end of file From ec87169909933d821a07bfcfba7d96ae045cc0ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 28 Dec 2024 16:23:27 +0100 Subject: [PATCH 15/27] Add a dependency on sed --- recipe/recipe.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/recipe.yaml b/recipe/recipe.yaml index 9c0bcd5..2272d11 100644 --- a/recipe/recipe.yaml +++ b/recipe/recipe.yaml @@ -52,6 +52,7 @@ requirements: - cmake - mlir - llvmdev + - sed host: - python - pybind11 From df1f869173a4dc5a47ae16d36f889484c0acdf4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 28 Dec 2024 16:27:17 +0100 Subject: [PATCH 16/27] Make that m2-sed for win --- recipe/recipe.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipe/recipe.yaml b/recipe/recipe.yaml index 2272d11..9b9c687 100644 --- a/recipe/recipe.yaml +++ b/recipe/recipe.yaml @@ -52,7 +52,8 @@ requirements: - cmake - mlir - llvmdev - - sed + - sed # [unix] + - m2-sed # [win] host: - python - pybind11 From 316da3bc510b157177e34b2182e4ce073f1ba821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 28 Dec 2024 16:31:40 +0100 Subject: [PATCH 17/27] Use rattler syntax for conditionals --- recipe/recipe.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipe/recipe.yaml b/recipe/recipe.yaml index 9b9c687..a78d29f 100644 --- a/recipe/recipe.yaml +++ b/recipe/recipe.yaml @@ -52,8 +52,9 @@ requirements: - cmake - mlir - llvmdev - - sed # [unix] - - m2-sed # [win] + - if: win + then: m2-sed + else: sed host: - python - pybind11 From ee6899117502497837abd1348a5d9d5929b58962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 28 Dec 2024 16:44:14 +0100 Subject: [PATCH 18/27] Backport a patch for building on Windows --- ...x64-option-and-reuse-cmake-build-typ.patch | 34 +++++++++++++++++++ recipe/recipe.yaml | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 recipe/patches/0011-Don-t-specify-A-x64-option-and-reuse-cmake-build-typ.patch diff --git a/recipe/patches/0011-Don-t-specify-A-x64-option-and-reuse-cmake-build-typ.patch b/recipe/patches/0011-Don-t-specify-A-x64-option-and-reuse-cmake-build-typ.patch new file mode 100644 index 0000000..d97c8a5 --- /dev/null +++ b/recipe/patches/0011-Don-t-specify-A-x64-option-and-reuse-cmake-build-typ.patch @@ -0,0 +1,34 @@ +From 95b7ae2159e6a61cf960c8d9efd631ab2e0b6e35 Mon Sep 17 00:00:00 2001 +From: Anatoly Myachev +Date: Wed, 30 Oct 2024 14:56:52 +0100 +Subject: [PATCH 11/11] Don't specify `-A x64` option and reuse cmake build + type config for Windows (#5014) + +The `-A` argument is not compatible with the Ninja generator. + +Signed-off-by: Anatoly Myachev +--- + python/setup.py | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/python/setup.py b/python/setup.py +index c60dc6158..da924502b 100644 +--- a/python/setup.py ++++ b/python/setup.py +@@ -378,12 +378,10 @@ class CMakeBuild(build_ext): + cfg = get_build_type() + build_args = ["--config", cfg] + ++ cmake_args += [f"-DCMAKE_BUILD_TYPE={cfg}"] + if platform.system() == "Windows": + cmake_args += [f"-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_{cfg.upper()}={extdir}"] +- if sys.maxsize > 2**32: +- cmake_args += ["-A", "x64"] + else: +- cmake_args += ["-DCMAKE_BUILD_TYPE=" + cfg] + max_jobs = os.getenv("MAX_JOBS", str(2 * os.cpu_count())) + build_args += ['-j' + max_jobs] + +-- +2.47.1 + diff --git a/recipe/recipe.yaml b/recipe/recipe.yaml index a78d29f..6b57243 100644 --- a/recipe/recipe.yaml +++ b/recipe/recipe.yaml @@ -36,6 +36,8 @@ source: # https://github.com/triton-lang/triton/commit/f48dbc1b106c93144c198fbf3c4f30b2aab9d242 - patches/0009-CODEGEN-Support-CUDA-12.6-4588.patch - patches/0010-Use-system-PATH-to-find-tools-in-CONDA_PREFIX.patch + # https://github.com/triton-lang/triton/commit/0591b3756bd4143b7163235c0eca4d718948e982 + - patches/0011-Don-t-specify-A-x64-option-and-reuse-cmake-build-typ.patch build: number: ${{ build_number }} From e13f21a6891da2440a42af19c37405a1c35e1920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 28 Dec 2024 16:51:46 +0100 Subject: [PATCH 19/27] Sed flags causing command-line error with MSVC --- recipe/build.bat | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipe/build.bat b/recipe/build.bat index 7da3d99..bd2b782 100644 --- a/recipe/build.bat +++ b/recipe/build.bat @@ -19,5 +19,8 @@ rem the build does not run C++ unittests, and they implicitly fetch gtest rem no easy way of passing this, not really worth a whole patch sed -i -e '/TRITON_BUILD_UT/s:\bON:OFF:' CMakeLists.txt +rem incompatible with MSVC +sed -i -e 's:-Wno-covered-switch-default::' CMakeLists.txt + cd python %PYTHON% -m pip install . -vv From 9c83f168a97f15d163a2e73ae0fff0f7f7cadd48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 28 Dec 2024 17:03:47 +0100 Subject: [PATCH 20/27] Revert "Sed flags causing command-line error with MSVC" This reverts commit e13f21a6891da2440a42af19c37405a1c35e1920. --- recipe/build.bat | 3 --- 1 file changed, 3 deletions(-) diff --git a/recipe/build.bat b/recipe/build.bat index bd2b782..7da3d99 100644 --- a/recipe/build.bat +++ b/recipe/build.bat @@ -19,8 +19,5 @@ rem the build does not run C++ unittests, and they implicitly fetch gtest rem no easy way of passing this, not really worth a whole patch sed -i -e '/TRITON_BUILD_UT/s:\bON:OFF:' CMakeLists.txt -rem incompatible with MSVC -sed -i -e 's:-Wno-covered-switch-default::' CMakeLists.txt - cd python %PYTHON% -m pip install . -vv From 8b2b8e5ecd77a9df5428fdf4893aa3811d8c7d41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 28 Dec 2024 17:05:04 +0100 Subject: [PATCH 21/27] Try forcing clang on Windows --- recipe/conda_build_config.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index a12cac8..e46fbe9 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -25,3 +25,7 @@ cuda_compiler: - cuda-nvcc cuda_compiler_version: - 12.6 +c_compiler: # [win] + - clang # [win] +cxx_compiler: # [win] + - clangxx # [win] From 8aa919ea601de803728863d87dd93a60fd8b71ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 28 Dec 2024 17:05:17 +0100 Subject: [PATCH 22/27] MNT: Re-rendered with conda-build 24.11.2, conda-smithy 3.45.1, and conda-forge-pinning 2024.12.27.18.01.51 --- .ci_support/win_64_python3.10.____cpython.yaml | 2 +- .ci_support/win_64_python3.11.____cpython.yaml | 2 +- .ci_support/win_64_python3.12.____cpython.yaml | 2 +- .ci_support/win_64_python3.13.____cp313.yaml | 2 +- .ci_support/win_64_python3.9.____cpython.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.ci_support/win_64_python3.10.____cpython.yaml b/.ci_support/win_64_python3.10.____cpython.yaml index 80676ee..15d05bb 100644 --- a/.ci_support/win_64_python3.10.____cpython.yaml +++ b/.ci_support/win_64_python3.10.____cpython.yaml @@ -9,7 +9,7 @@ cuda_compiler: cuda_compiler_version: - '12.6' cxx_compiler: -- vs2019 +- clangxx libmlir: - '19' llvm: diff --git a/.ci_support/win_64_python3.11.____cpython.yaml b/.ci_support/win_64_python3.11.____cpython.yaml index 30b478a..f8cb272 100644 --- a/.ci_support/win_64_python3.11.____cpython.yaml +++ b/.ci_support/win_64_python3.11.____cpython.yaml @@ -9,7 +9,7 @@ cuda_compiler: cuda_compiler_version: - '12.6' cxx_compiler: -- vs2019 +- clangxx libmlir: - '19' llvm: diff --git a/.ci_support/win_64_python3.12.____cpython.yaml b/.ci_support/win_64_python3.12.____cpython.yaml index ed5567f..78c07e3 100644 --- a/.ci_support/win_64_python3.12.____cpython.yaml +++ b/.ci_support/win_64_python3.12.____cpython.yaml @@ -9,7 +9,7 @@ cuda_compiler: cuda_compiler_version: - '12.6' cxx_compiler: -- vs2019 +- clangxx libmlir: - '19' llvm: diff --git a/.ci_support/win_64_python3.13.____cp313.yaml b/.ci_support/win_64_python3.13.____cp313.yaml index 0f294d7..44715b3 100644 --- a/.ci_support/win_64_python3.13.____cp313.yaml +++ b/.ci_support/win_64_python3.13.____cp313.yaml @@ -9,7 +9,7 @@ cuda_compiler: cuda_compiler_version: - '12.6' cxx_compiler: -- vs2019 +- clangxx libmlir: - '19' llvm: diff --git a/.ci_support/win_64_python3.9.____cpython.yaml b/.ci_support/win_64_python3.9.____cpython.yaml index 6a24e33..72d3506 100644 --- a/.ci_support/win_64_python3.9.____cpython.yaml +++ b/.ci_support/win_64_python3.9.____cpython.yaml @@ -9,7 +9,7 @@ cuda_compiler: cuda_compiler_version: - '12.6' cxx_compiler: -- vs2019 +- clangxx libmlir: - '19' llvm: From be327abb6d070e354d89c88a6070f14b7cfcc4b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 28 Dec 2024 17:17:48 +0100 Subject: [PATCH 23/27] Disable Windows again --- recipe/recipe.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipe/recipe.yaml b/recipe/recipe.yaml index 6b57243..2cdc884 100644 --- a/recipe/recipe.yaml +++ b/recipe/recipe.yaml @@ -43,7 +43,9 @@ build: number: ${{ build_number }} string: cuda${{ cuda_compiler_version | version_to_buildstring }}py${{ python | version_to_buildstring }}h${{ hash }}_${{ build_number }} # TODO: CPU-only support still under development - skip: "unix or cuda_compiler_version == \"None\"" + # No success enabling Windows build as of 3.1.0: + # https://github.com/conda-forge/triton-feedstock/pull/29#issuecomment-2564371725 + skip: "win or cuda_compiler_version == \"None\"" requirements: build: From ce8e684ed07ac1b53762d25863a982d059766183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 28 Dec 2024 17:17:59 +0100 Subject: [PATCH 24/27] MNT: Re-rendered with conda-build 24.11.2, conda-smithy 3.45.1, and conda-forge-pinning 2024.12.27.18.01.51 --- .azure-pipelines/azure-pipelines-linux.yml | 81 ++++++++++ .azure-pipelines/azure-pipelines-osx.yml | 49 ++++++ .../linux_64_python3.10.____cpython.yaml | 43 ++++++ .../linux_64_python3.11.____cpython.yaml | 43 ++++++ .../linux_64_python3.12.____cpython.yaml | 43 ++++++ .../linux_64_python3.13.____cp313.yaml | 43 ++++++ .../linux_64_python3.9.____cpython.yaml | 43 ++++++ ...aml => osx_64_python3.10.____cpython.yaml} | 17 +- ...aml => osx_64_python3.11.____cpython.yaml} | 17 +- ...aml => osx_64_python3.12.____cpython.yaml} | 17 +- ....yaml => osx_64_python3.13.____cp313.yaml} | 17 +- ...yaml => osx_64_python3.9.____cpython.yaml} | 17 +- .scripts/build_steps.sh | 93 +++++++++++ .scripts/run_docker_build.sh | 114 ++++++++++++++ .scripts/run_osx_build.sh | 108 +++++++++++++ .scripts/run_win_build.bat | 146 ------------------ README.md | 55 +++++-- azure-pipelines.yml | 3 +- 18 files changed, 767 insertions(+), 182 deletions(-) create mode 100755 .azure-pipelines/azure-pipelines-linux.yml create mode 100755 .azure-pipelines/azure-pipelines-osx.yml create mode 100644 .ci_support/linux_64_python3.10.____cpython.yaml create mode 100644 .ci_support/linux_64_python3.11.____cpython.yaml create mode 100644 .ci_support/linux_64_python3.12.____cpython.yaml create mode 100644 .ci_support/linux_64_python3.13.____cp313.yaml create mode 100644 .ci_support/linux_64_python3.9.____cpython.yaml rename .ci_support/{win_64_python3.10.____cpython.yaml => osx_64_python3.10.____cpython.yaml} (62%) rename .ci_support/{win_64_python3.11.____cpython.yaml => osx_64_python3.11.____cpython.yaml} (62%) rename .ci_support/{win_64_python3.12.____cpython.yaml => osx_64_python3.12.____cpython.yaml} (62%) rename .ci_support/{win_64_python3.13.____cp313.yaml => osx_64_python3.13.____cp313.yaml} (62%) rename .ci_support/{win_64_python3.9.____cpython.yaml => osx_64_python3.9.____cpython.yaml} (62%) create mode 100755 .scripts/build_steps.sh create mode 100755 .scripts/run_docker_build.sh create mode 100755 .scripts/run_osx_build.sh delete mode 100755 .scripts/run_win_build.bat diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml new file mode 100755 index 0000000..a44f210 --- /dev/null +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -0,0 +1,81 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + +jobs: +- job: linux + pool: + vmImage: ubuntu-latest + strategy: + matrix: + linux_64_python3.10.____cpython: + CONFIG: linux_64_python3.10.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-alma-x86_64:8 + linux_64_python3.11.____cpython: + CONFIG: linux_64_python3.11.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-alma-x86_64:8 + linux_64_python3.12.____cpython: + CONFIG: linux_64_python3.12.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-alma-x86_64:8 + linux_64_python3.13.____cp313: + CONFIG: linux_64_python3.13.____cp313 + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-alma-x86_64:8 + linux_64_python3.9.____cpython: + CONFIG: linux_64_python3.9.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-alma-x86_64:8 + timeoutInMinutes: 360 + variables: {} + + steps: + - script: | + sudo mkdir -p /opt/empty_dir || true + for d in \ + /opt/ghc \ + /opt/hostedtoolcache \ + /usr/lib/jvm \ + /usr/local/.ghcup \ + /usr/local/lib/android \ + /usr/local/share/powershell \ + /usr/share/dotnet \ + /usr/share/swift \ + ; do + sudo rsync --stats -a --delete /opt/empty_dir/ $d || true + done + sudo apt-get purge -y -f firefox \ + google-chrome-stable \ + microsoft-edge-stable + sudo apt-get autoremove -y >& /dev/null + sudo apt-get autoclean -y >& /dev/null + df -h + displayName: Manage disk space + # configure qemu binfmt-misc running. This allows us to run docker containers + # embedded qemu-static + - script: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes + ls /proc/sys/fs/binfmt_misc/ + condition: not(startsWith(variables['CONFIG'], 'linux_64')) + displayName: Configure binfmt_misc + + - script: | + export CI=azure + export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) + export remote_url=$(Build.Repository.Uri) + export sha=$(Build.SourceVersion) + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then + export IS_PR_BUILD="True" + else + export IS_PR_BUILD="False" + fi + .scripts/run_docker_build.sh + displayName: Run docker build + env: + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml new file mode 100755 index 0000000..c6d4e7d --- /dev/null +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -0,0 +1,49 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + +jobs: +- job: osx + pool: + vmImage: macOS-13 + strategy: + matrix: + osx_64_python3.10.____cpython: + CONFIG: osx_64_python3.10.____cpython + UPLOAD_PACKAGES: 'True' + osx_64_python3.11.____cpython: + CONFIG: osx_64_python3.11.____cpython + UPLOAD_PACKAGES: 'True' + osx_64_python3.12.____cpython: + CONFIG: osx_64_python3.12.____cpython + UPLOAD_PACKAGES: 'True' + osx_64_python3.13.____cp313: + CONFIG: osx_64_python3.13.____cp313 + UPLOAD_PACKAGES: 'True' + osx_64_python3.9.____cpython: + CONFIG: osx_64_python3.9.____cpython + UPLOAD_PACKAGES: 'True' + timeoutInMinutes: 360 + variables: {} + + steps: + # TODO: Fast finish on azure pipelines? + - script: | + export CI=azure + export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) + export remote_url=$(Build.Repository.Uri) + export sha=$(Build.SourceVersion) + export OSX_FORCE_SDK_DOWNLOAD="1" + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then + export IS_PR_BUILD="True" + else + export IS_PR_BUILD="False" + fi + ./.scripts/run_osx_build.sh + displayName: Run OSX build + env: + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.ci_support/linux_64_python3.10.____cpython.yaml b/.ci_support/linux_64_python3.10.____cpython.yaml new file mode 100644 index 0000000..73b4ee1 --- /dev/null +++ b/.ci_support/linux_64_python3.10.____cpython.yaml @@ -0,0 +1,43 @@ +c_stdlib: +- sysroot +c_stdlib_version: +- '2.28' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- cuda-nvcc +cuda_compiler_version: +- '12.6' +cxx_compiler: +- gxx +cxx_compiler_version: +- '13' +docker_image: +- quay.io/condaforge/linux-anvil-alma-x86_64:8 +libmlir: +- '19' +llvm: +- '19' +llvmdev: +- '19' +mlir: +- '19' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.10.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - docker_image +zlib: +- '1' diff --git a/.ci_support/linux_64_python3.11.____cpython.yaml b/.ci_support/linux_64_python3.11.____cpython.yaml new file mode 100644 index 0000000..7edb6a8 --- /dev/null +++ b/.ci_support/linux_64_python3.11.____cpython.yaml @@ -0,0 +1,43 @@ +c_stdlib: +- sysroot +c_stdlib_version: +- '2.28' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- cuda-nvcc +cuda_compiler_version: +- '12.6' +cxx_compiler: +- gxx +cxx_compiler_version: +- '13' +docker_image: +- quay.io/condaforge/linux-anvil-alma-x86_64:8 +libmlir: +- '19' +llvm: +- '19' +llvmdev: +- '19' +mlir: +- '19' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.11.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - docker_image +zlib: +- '1' diff --git a/.ci_support/linux_64_python3.12.____cpython.yaml b/.ci_support/linux_64_python3.12.____cpython.yaml new file mode 100644 index 0000000..bf648a2 --- /dev/null +++ b/.ci_support/linux_64_python3.12.____cpython.yaml @@ -0,0 +1,43 @@ +c_stdlib: +- sysroot +c_stdlib_version: +- '2.28' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- cuda-nvcc +cuda_compiler_version: +- '12.6' +cxx_compiler: +- gxx +cxx_compiler_version: +- '13' +docker_image: +- quay.io/condaforge/linux-anvil-alma-x86_64:8 +libmlir: +- '19' +llvm: +- '19' +llvmdev: +- '19' +mlir: +- '19' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.12.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - docker_image +zlib: +- '1' diff --git a/.ci_support/linux_64_python3.13.____cp313.yaml b/.ci_support/linux_64_python3.13.____cp313.yaml new file mode 100644 index 0000000..4075acd --- /dev/null +++ b/.ci_support/linux_64_python3.13.____cp313.yaml @@ -0,0 +1,43 @@ +c_stdlib: +- sysroot +c_stdlib_version: +- '2.28' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- cuda-nvcc +cuda_compiler_version: +- '12.6' +cxx_compiler: +- gxx +cxx_compiler_version: +- '13' +docker_image: +- quay.io/condaforge/linux-anvil-alma-x86_64:8 +libmlir: +- '19' +llvm: +- '19' +llvmdev: +- '19' +mlir: +- '19' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.13.* *_cp313 +target_platform: +- linux-64 +zip_keys: +- - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - docker_image +zlib: +- '1' diff --git a/.ci_support/linux_64_python3.9.____cpython.yaml b/.ci_support/linux_64_python3.9.____cpython.yaml new file mode 100644 index 0000000..707f401 --- /dev/null +++ b/.ci_support/linux_64_python3.9.____cpython.yaml @@ -0,0 +1,43 @@ +c_stdlib: +- sysroot +c_stdlib_version: +- '2.28' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- cuda-nvcc +cuda_compiler_version: +- '12.6' +cxx_compiler: +- gxx +cxx_compiler_version: +- '13' +docker_image: +- quay.io/condaforge/linux-anvil-alma-x86_64:8 +libmlir: +- '19' +llvm: +- '19' +llvmdev: +- '19' +mlir: +- '19' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.9.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - docker_image +zlib: +- '1' diff --git a/.ci_support/win_64_python3.10.____cpython.yaml b/.ci_support/osx_64_python3.10.____cpython.yaml similarity index 62% rename from .ci_support/win_64_python3.10.____cpython.yaml rename to .ci_support/osx_64_python3.10.____cpython.yaml index 15d05bb..c9920d7 100644 --- a/.ci_support/win_64_python3.10.____cpython.yaml +++ b/.ci_support/osx_64_python3.10.____cpython.yaml @@ -1,5 +1,11 @@ +MACOSX_DEPLOYMENT_TARGET: +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' c_stdlib: -- vs +- macosx_deployment_target +c_stdlib_version: +- '10.13' channel_sources: - conda-forge channel_targets: @@ -10,12 +16,16 @@ cuda_compiler_version: - '12.6' cxx_compiler: - clangxx +cxx_compiler_version: +- '18' libmlir: - '19' llvm: - '19' llvmdev: - '19' +macos_machine: +- x86_64-apple-darwin13.4.0 mlir: - '19' pin_run_as_build: @@ -25,9 +35,6 @@ pin_run_as_build: python: - 3.10.* *_cpython target_platform: -- win-64 -zip_keys: -- - cuda_compiler - - cuda_compiler_version +- osx-64 zlib: - '1' diff --git a/.ci_support/win_64_python3.11.____cpython.yaml b/.ci_support/osx_64_python3.11.____cpython.yaml similarity index 62% rename from .ci_support/win_64_python3.11.____cpython.yaml rename to .ci_support/osx_64_python3.11.____cpython.yaml index f8cb272..fc0b47e 100644 --- a/.ci_support/win_64_python3.11.____cpython.yaml +++ b/.ci_support/osx_64_python3.11.____cpython.yaml @@ -1,5 +1,11 @@ +MACOSX_DEPLOYMENT_TARGET: +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' c_stdlib: -- vs +- macosx_deployment_target +c_stdlib_version: +- '10.13' channel_sources: - conda-forge channel_targets: @@ -10,12 +16,16 @@ cuda_compiler_version: - '12.6' cxx_compiler: - clangxx +cxx_compiler_version: +- '18' libmlir: - '19' llvm: - '19' llvmdev: - '19' +macos_machine: +- x86_64-apple-darwin13.4.0 mlir: - '19' pin_run_as_build: @@ -25,9 +35,6 @@ pin_run_as_build: python: - 3.11.* *_cpython target_platform: -- win-64 -zip_keys: -- - cuda_compiler - - cuda_compiler_version +- osx-64 zlib: - '1' diff --git a/.ci_support/win_64_python3.12.____cpython.yaml b/.ci_support/osx_64_python3.12.____cpython.yaml similarity index 62% rename from .ci_support/win_64_python3.12.____cpython.yaml rename to .ci_support/osx_64_python3.12.____cpython.yaml index 78c07e3..1ea9cdb 100644 --- a/.ci_support/win_64_python3.12.____cpython.yaml +++ b/.ci_support/osx_64_python3.12.____cpython.yaml @@ -1,5 +1,11 @@ +MACOSX_DEPLOYMENT_TARGET: +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' c_stdlib: -- vs +- macosx_deployment_target +c_stdlib_version: +- '10.13' channel_sources: - conda-forge channel_targets: @@ -10,12 +16,16 @@ cuda_compiler_version: - '12.6' cxx_compiler: - clangxx +cxx_compiler_version: +- '18' libmlir: - '19' llvm: - '19' llvmdev: - '19' +macos_machine: +- x86_64-apple-darwin13.4.0 mlir: - '19' pin_run_as_build: @@ -25,9 +35,6 @@ pin_run_as_build: python: - 3.12.* *_cpython target_platform: -- win-64 -zip_keys: -- - cuda_compiler - - cuda_compiler_version +- osx-64 zlib: - '1' diff --git a/.ci_support/win_64_python3.13.____cp313.yaml b/.ci_support/osx_64_python3.13.____cp313.yaml similarity index 62% rename from .ci_support/win_64_python3.13.____cp313.yaml rename to .ci_support/osx_64_python3.13.____cp313.yaml index 44715b3..a4e141b 100644 --- a/.ci_support/win_64_python3.13.____cp313.yaml +++ b/.ci_support/osx_64_python3.13.____cp313.yaml @@ -1,5 +1,11 @@ +MACOSX_DEPLOYMENT_TARGET: +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' c_stdlib: -- vs +- macosx_deployment_target +c_stdlib_version: +- '10.13' channel_sources: - conda-forge channel_targets: @@ -10,12 +16,16 @@ cuda_compiler_version: - '12.6' cxx_compiler: - clangxx +cxx_compiler_version: +- '18' libmlir: - '19' llvm: - '19' llvmdev: - '19' +macos_machine: +- x86_64-apple-darwin13.4.0 mlir: - '19' pin_run_as_build: @@ -25,9 +35,6 @@ pin_run_as_build: python: - 3.13.* *_cp313 target_platform: -- win-64 -zip_keys: -- - cuda_compiler - - cuda_compiler_version +- osx-64 zlib: - '1' diff --git a/.ci_support/win_64_python3.9.____cpython.yaml b/.ci_support/osx_64_python3.9.____cpython.yaml similarity index 62% rename from .ci_support/win_64_python3.9.____cpython.yaml rename to .ci_support/osx_64_python3.9.____cpython.yaml index 72d3506..46e24ce 100644 --- a/.ci_support/win_64_python3.9.____cpython.yaml +++ b/.ci_support/osx_64_python3.9.____cpython.yaml @@ -1,5 +1,11 @@ +MACOSX_DEPLOYMENT_TARGET: +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' c_stdlib: -- vs +- macosx_deployment_target +c_stdlib_version: +- '10.13' channel_sources: - conda-forge channel_targets: @@ -10,12 +16,16 @@ cuda_compiler_version: - '12.6' cxx_compiler: - clangxx +cxx_compiler_version: +- '18' libmlir: - '19' llvm: - '19' llvmdev: - '19' +macos_machine: +- x86_64-apple-darwin13.4.0 mlir: - '19' pin_run_as_build: @@ -25,9 +35,6 @@ pin_run_as_build: python: - 3.9.* *_cpython target_platform: -- win-64 -zip_keys: -- - cuda_compiler - - cuda_compiler_version +- osx-64 zlib: - '1' diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh new file mode 100755 index 0000000..2b517d9 --- /dev/null +++ b/.scripts/build_steps.sh @@ -0,0 +1,93 @@ +#!/usr/bin/env bash + +# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here +# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent +# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also +# benefit from the improvement. + +# -*- mode: jinja-shell -*- + +set -xeuo pipefail +export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" +source ${FEEDSTOCK_ROOT}/.scripts/logging_utils.sh + + +( endgroup "Start Docker" ) 2> /dev/null + +( startgroup "Configuring conda" ) 2> /dev/null + +export PYTHONUNBUFFERED=1 +export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" +export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" +export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" + +cat >~/.condarc < /opt/conda/conda-meta/history +micromamba install --root-prefix ~/.conda --prefix /opt/conda \ + --yes --override-channels --channel conda-forge --strict-channel-priority \ + pip rattler-build conda-forge-ci-setup=4 "conda-build>=24.1" +export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 + +# set up the condarc +setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" + +source run_conda_forge_build_setup + + + +# make the build number clobber +make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" + + + +( endgroup "Configuring conda" ) 2> /dev/null + +if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then + cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" +fi + +if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then + echo "rattler-build currently doesn't support debug mode" +else + + rattler-build build --recipe "${RECIPE_ROOT}" \ + -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + ${EXTRA_CB_OPTIONS:-} \ + --target-platform "${HOST_PLATFORM}" \ + --extra-meta flow_run_id="${flow_run_id:-}" \ + --extra-meta remote_url="${remote_url:-}" \ + --extra-meta sha="${sha:-}" + ( startgroup "Inspecting artifacts" ) 2> /dev/null + + # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir "${RECIPE_ROOT}" -m "${CONFIG_FILE}" || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" + + ( endgroup "Inspecting artifacts" ) 2> /dev/null + ( startgroup "Validating outputs" ) 2> /dev/null + + validate_recipe_outputs "${FEEDSTOCK_NAME}" + + ( endgroup "Validating outputs" ) 2> /dev/null + + ( startgroup "Uploading packages" ) 2> /dev/null + + if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then + upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" + fi + + ( endgroup "Uploading packages" ) 2> /dev/null +fi + +( startgroup "Final checks" ) 2> /dev/null + +touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}" \ No newline at end of file diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh new file mode 100755 index 0000000..00f377a --- /dev/null +++ b/.scripts/run_docker_build.sh @@ -0,0 +1,114 @@ +#!/usr/bin/env bash + +# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here +# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent +# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also +# benefit from the improvement. + +source .scripts/logging_utils.sh + +( startgroup "Configure Docker" ) 2> /dev/null + +set -xeo pipefail + +THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" +PROVIDER_DIR="$(basename $THISDIR)" + +FEEDSTOCK_ROOT="$( cd "$( dirname "$0" )/.." >/dev/null && pwd )" +RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" + +if [ -z ${FEEDSTOCK_NAME} ]; then + export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) +fi + +if [[ "${sha:-}" == "" ]]; then + pushd "${FEEDSTOCK_ROOT}" + sha=$(git rev-parse HEAD) + popd +fi + +docker info + +# In order for the conda-build process in the container to write to the mounted +# volumes, we need to run with the same id as the host machine, which is +# normally the owner of the mounted volumes, or at least has write permission +export HOST_USER_ID=$(id -u) +# Check if docker-machine is being used (normally on OSX) and get the uid from +# the VM +if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then + export HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u) +fi + +ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts" + +if [ -z "$CONFIG" ]; then + set +x + FILES=`ls .ci_support/linux_*` + CONFIGS="" + for file in $FILES; do + CONFIGS="${CONFIGS}'${file:12:-5}' or "; + done + echo "Need to set CONFIG env variable. Value can be one of ${CONFIGS:0:-4}" + exit 1 +fi + +if [ -z "${DOCKER_IMAGE}" ]; then + SHYAML_INSTALLED="$(shyaml -h || echo NO)" + if [ "${SHYAML_INSTALLED}" == "NO" ]; then + echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Trying to parse with coreutils" + DOCKER_IMAGE=$(cat .ci_support/${CONFIG}.yaml | grep '^docker_image:$' -A 1 | tail -n 1 | cut -b 3-) + if [ "${DOCKER_IMAGE}" = "" ]; then + echo "No docker_image entry found in ${CONFIG}. Falling back to quay.io/condaforge/linux-anvil-comp7" + DOCKER_IMAGE="quay.io/condaforge/linux-anvil-comp7" + fi + else + DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 quay.io/condaforge/linux-anvil-comp7 )" + fi +fi + +mkdir -p "$ARTIFACTS" +DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}" +rm -f "$DONE_CANARY" + +# Allow people to specify extra default arguments to `docker run` (e.g. `--rm`) +DOCKER_RUN_ARGS="${CONDA_FORGE_DOCKER_RUN_ARGS}" +if [ -z "${CI}" ]; then + DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" +fi + +( endgroup "Configure Docker" ) 2> /dev/null + +( startgroup "Start Docker" ) 2> /dev/null + +export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" +export IS_PR_BUILD="${IS_PR_BUILD:-False}" +docker pull "${DOCKER_IMAGE}" +docker run ${DOCKER_RUN_ARGS} \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ + -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ + -e CONFIG \ + -e HOST_USER_ID \ + -e UPLOAD_PACKAGES \ + -e IS_PR_BUILD \ + -e GIT_BRANCH \ + -e UPLOAD_ON_BRANCH \ + -e CI \ + -e FEEDSTOCK_NAME \ + -e CPU_COUNT \ + -e BUILD_WITH_CONDA_DEBUG \ + -e BUILD_OUTPUT_ID \ + -e flow_run_id \ + -e remote_url \ + -e sha \ + -e BINSTAR_TOKEN \ + -e FEEDSTOCK_TOKEN \ + -e STAGING_BINSTAR_TOKEN \ + "${DOCKER_IMAGE}" \ + bash \ + "/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh" + +# verify that the end of the script was reached +test -f "$DONE_CANARY" + +# This closes the last group opened in `build_steps.sh` +( endgroup "Final checks" ) 2> /dev/null \ No newline at end of file diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh new file mode 100755 index 0000000..ad5989a --- /dev/null +++ b/.scripts/run_osx_build.sh @@ -0,0 +1,108 @@ +#!/usr/bin/env bash + +# -*- mode: jinja-shell -*- + +source .scripts/logging_utils.sh + +set -xe + +MINIFORGE_HOME="${MINIFORGE_HOME:-${HOME}/miniforge3}" +MINIFORGE_HOME="${MINIFORGE_HOME%/}" # remove trailing slash +export CONDA_BLD_PATH="${CONDA_BLD_PATH:-${MINIFORGE_HOME}/conda-bld}" + +( startgroup "Provisioning base env with micromamba" ) 2> /dev/null +MICROMAMBA_VERSION="1.5.10-0" +if [[ "$(uname -m)" == "arm64" ]]; then + osx_arch="osx-arm64" +else + osx_arch="osx-64" +fi +MICROMAMBA_URL="https://github.com/mamba-org/micromamba-releases/releases/download/${MICROMAMBA_VERSION}/micromamba-${osx_arch}" +MAMBA_ROOT_PREFIX="${MINIFORGE_HOME}-micromamba-$(date +%s)" +echo "Downloading micromamba ${MICROMAMBA_VERSION}" +micromamba_exe="$(mktemp -d)/micromamba" +curl -L -o "${micromamba_exe}" "${MICROMAMBA_URL}" +chmod +x "${micromamba_exe}" +echo "Creating environment" +"${micromamba_exe}" create --yes --root-prefix "${MAMBA_ROOT_PREFIX}" --prefix "${MINIFORGE_HOME}" \ + --channel conda-forge \ + pip rattler-build conda-forge-ci-setup=4 "conda-build>=24.1" +echo "Moving pkgs cache from ${MAMBA_ROOT_PREFIX} to ${MINIFORGE_HOME}" +mv "${MAMBA_ROOT_PREFIX}/pkgs" "${MINIFORGE_HOME}" +echo "Cleaning up micromamba" +rm -rf "${MAMBA_ROOT_PREFIX}" "${micromamba_exe}" || true +( endgroup "Provisioning base env with micromamba" ) 2> /dev/null + +( startgroup "Configuring conda" ) 2> /dev/null +echo "Activating environment" +source "${MINIFORGE_HOME}/etc/profile.d/conda.sh" +conda activate base +export CONDA_SOLVER="libmamba" +export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 + + + + + +echo -e "\n\nSetting up the condarc and mangling the compiler." +setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml + +if [[ "${CI:-}" != "" ]]; then + mangle_compiler ./ ./recipe .ci_support/${CONFIG}.yaml +fi + +if [[ "${CI:-}" != "" ]]; then + echo -e "\n\nMangling homebrew in the CI to avoid conflicts." + /usr/bin/sudo mangle_homebrew + /usr/bin/sudo -k +else + echo -e "\n\nNot mangling homebrew as we are not running in CI" +fi + +if [[ "${sha:-}" == "" ]]; then + sha=$(git rev-parse HEAD) +fi + +echo -e "\n\nRunning the build setup script." +source run_conda_forge_build_setup + + + +( endgroup "Configuring conda" ) 2> /dev/null + +if [[ -f LICENSE.txt ]]; then + cp LICENSE.txt "recipe/recipe-scripts-license.txt" +fi + +if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then + echo "rattler-build does not currently support debug mode" +else + + rattler-build build --recipe ./recipe \ + -m ./.ci_support/${CONFIG}.yaml \ + ${EXTRA_CB_OPTIONS:-} \ + --target-platform "${HOST_PLATFORM}" \ + --extra-meta flow_run_id="$flow_run_id" \ + --extra-meta remote_url="$remote_url" \ + --extra-meta sha="$sha" + + ( startgroup "Inspecting artifacts" ) 2> /dev/null + + # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir ./recipe -m ./.ci_support/${CONFIG}.yaml || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" + + ( endgroup "Inspecting artifacts" ) 2> /dev/null + ( startgroup "Validating outputs" ) 2> /dev/null + + validate_recipe_outputs "${FEEDSTOCK_NAME}" + + ( endgroup "Validating outputs" ) 2> /dev/null + + ( startgroup "Uploading packages" ) 2> /dev/null + + if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then + upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml + fi + + ( endgroup "Uploading packages" ) 2> /dev/null +fi \ No newline at end of file diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat deleted file mode 100755 index c427860..0000000 --- a/.scripts/run_win_build.bat +++ /dev/null @@ -1,146 +0,0 @@ -:: PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here -:: will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent -:: changes to this script, consider a proposal to conda-smithy so that other feedstocks can also -:: benefit from the improvement. - -:: INPUTS (required environment variables) -:: CONFIG: name of the .ci_support/*.yaml file for this job -:: CI: azure, github_actions, or unset -:: MINIFORGE_HOME: where to install the base conda environment -:: UPLOAD_PACKAGES: true or false -:: UPLOAD_ON_BRANCH: true or false - -setlocal enableextensions enabledelayedexpansion - -FOR %%A IN ("%~dp0.") DO SET "REPO_ROOT=%%~dpA" -if "%MINIFORGE_HOME%"=="" set "MINIFORGE_HOME=%USERPROFILE%\Miniforge3" -:: Remove trailing backslash, if present -if "%MINIFORGE_HOME:~-1%"=="\" set "MINIFORGE_HOME=%MINIFORGE_HOME:~0,-1%" -call :start_group "Provisioning base env with micromamba" -set "MAMBA_ROOT_PREFIX=%MINIFORGE_HOME%-micromamba-%RANDOM%" -set "MICROMAMBA_VERSION=1.5.10-0" -set "MICROMAMBA_URL=https://github.com/mamba-org/micromamba-releases/releases/download/%MICROMAMBA_VERSION%/micromamba-win-64" -set "MICROMAMBA_TMPDIR=%TMP%\micromamba-%RANDOM%" -set "MICROMAMBA_EXE=%MICROMAMBA_TMPDIR%\micromamba.exe" - -echo Downloading micromamba %MICROMAMBA_VERSION% -if not exist "%MICROMAMBA_TMPDIR%" mkdir "%MICROMAMBA_TMPDIR%" -certutil -urlcache -split -f "%MICROMAMBA_URL%" "%MICROMAMBA_EXE%" -if !errorlevel! neq 0 exit /b !errorlevel! - -echo Creating environment -call "%MICROMAMBA_EXE%" create --yes --root-prefix "%MAMBA_ROOT_PREFIX%" --prefix "%MINIFORGE_HOME%" ^ - --channel conda-forge ^ - pip rattler-build conda-forge-ci-setup=4 "conda-build>=24.1" -if !errorlevel! neq 0 exit /b !errorlevel! -echo Removing %MAMBA_ROOT_PREFIX% -del /S /Q "%MAMBA_ROOT_PREFIX%" >nul -del /S /Q "%MICROMAMBA_TMPDIR%" >nul -call :end_group - -call :start_group "Configuring conda" - -:: Activate the base conda environment -echo Activating environment -call "%MINIFORGE_HOME%\Scripts\activate.bat" -:: Configure the solver -set "CONDA_SOLVER=libmamba" -if !errorlevel! neq 0 exit /b !errorlevel! -set "CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1" - -:: Set basic configuration -echo Setting up configuration -setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml -if !errorlevel! neq 0 exit /b !errorlevel! -echo Running build setup -CALL run_conda_forge_build_setup - - -if !errorlevel! neq 0 exit /b !errorlevel! - -if EXIST LICENSE.txt ( - echo Copying feedstock license - copy LICENSE.txt "recipe\\recipe-scripts-license.txt" -) - -if NOT [%flow_run_id%] == [] ( - set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --extra-meta flow_run_id=%flow_run_id% --extra-meta remote_url=%remote_url% --extra-meta sha=%sha%" -) - -call :end_group - -:: Build the recipe -echo Building recipe -rattler-build.exe build --recipe "recipe" -m .ci_support\%CONFIG%.yaml %EXTRA_CB_OPTIONS% --target-platform %HOST_PLATFORM% -if !errorlevel! neq 0 exit /b !errorlevel! - -call :start_group "Inspecting artifacts" -:: inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 -WHERE inspect_artifacts >nul 2>nul && inspect_artifacts --recipe-dir ".\recipe" -m .ci_support\%CONFIG%.yaml || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" -call :end_group - -:: Prepare some environment variables for the upload step -if /i "%CI%" == "github_actions" ( - set "FEEDSTOCK_NAME=%GITHUB_REPOSITORY:*/=%" - set "GIT_BRANCH=%GITHUB_REF:refs/heads/=%" - if /i "%GITHUB_EVENT_NAME%" == "pull_request" ( - set "IS_PR_BUILD=True" - ) else ( - set "IS_PR_BUILD=False" - ) - set "TEMP=%RUNNER_TEMP%" -) -if /i "%CI%" == "azure" ( - set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" - set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" - if /i "%BUILD_REASON%" == "PullRequest" ( - set "IS_PR_BUILD=True" - ) else ( - set "IS_PR_BUILD=False" - ) - set "TEMP=%UPLOAD_TEMP%" -) - -:: Validate -call :start_group "Validating outputs" -validate_recipe_outputs "%FEEDSTOCK_NAME%" -if !errorlevel! neq 0 exit /b !errorlevel! -call :end_group - -if /i "%UPLOAD_PACKAGES%" == "true" ( - if /i "%IS_PR_BUILD%" == "false" ( - call :start_group "Uploading packages" - if not exist "%TEMP%\" md "%TEMP%" - set "TMP=%TEMP%" - upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml - if !errorlevel! neq 0 exit /b !errorlevel! - call :end_group - ) -) - -exit - -:: Logging subroutines - -:start_group -if /i "%CI%" == "github_actions" ( - echo ::group::%~1 - exit /b -) -if /i "%CI%" == "azure" ( - echo ##[group]%~1 - exit /b -) -echo %~1 -exit /b - -:end_group -if /i "%CI%" == "github_actions" ( - echo ::endgroup:: - exit /b -) -if /i "%CI%" == "azure" ( - echo ##[endgroup] - exit /b -) -exit /b \ No newline at end of file diff --git a/README.md b/README.md index cc03d72..fed3625 100644 --- a/README.md +++ b/README.md @@ -34,38 +34,73 @@ Current build status
VariantStatus
linux_64_python3.10.____cpythonwin_64_python3.10.____cpython - variant + variant
linux_64_python3.11.____cpythonwin_64_python3.11.____cpython - variant + variant
linux_64_python3.12.____cpythonwin_64_python3.12.____cpython - variant + variant
linux_64_python3.13.____cp313win_64_python3.13.____cp313 - variant + variant
linux_64_python3.9.____cpythonwin_64_python3.9.____cpython - variant + variant
- + - + - + - + - + + + + + + + + + + + + + + + + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 879c4a9..013bdc1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,4 +28,5 @@ stages: condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true')) dependsOn: Check jobs: - - template: ./.azure-pipelines/azure-pipelines-win.yml \ No newline at end of file + - template: ./.azure-pipelines/azure-pipelines-linux.yml + - template: ./.azure-pipelines/azure-pipelines-osx.yml \ No newline at end of file From 8742d13318f26d146c1d4765809cc1b0e8894916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 28 Dec 2024 17:21:06 +0100 Subject: [PATCH 25/27] Remove dependency on filelock --- ...ove-unused-requirement-filelock-4356.patch | 71 +++++++++++++++++++ recipe/recipe.yaml | 4 +- 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 recipe/patches/0012-remove-unused-requirement-filelock-4356.patch diff --git a/recipe/patches/0012-remove-unused-requirement-filelock-4356.patch b/recipe/patches/0012-remove-unused-requirement-filelock-4356.patch new file mode 100644 index 0000000..f9038e1 --- /dev/null +++ b/recipe/patches/0012-remove-unused-requirement-filelock-4356.patch @@ -0,0 +1,71 @@ +From 4c4c6a4327508db8ca6adc0fb01fdb6ec16572ff Mon Sep 17 00:00:00 2001 +From: Cunshun Xia <505481172@qq.com> +Date: Fri, 19 Jul 2024 23:11:15 +0800 +Subject: [PATCH 12/12] remove unused requirement 'filelock' (#4356) + +The core Triton is a small number of people, and we receive many PRs +(thank +you!). To help us review your code more quickly, **if you are a new +contributor (less than 3 PRs merged) we ask that you complete the +following +tasks and include the filled-out checklist in your PR description.** + +Complete the following tasks before sending your PR, and replace `[ ]` +with +`[x]` to indicate you have done them. + +- [x] I am not making a trivial change, such as fixing a typo in a +comment. + +- [x] I have written a PR description following these + [rules](https://cbea.ms/git-commit/#why-not-how). + +- [x] I have run `pre-commit run --from-ref origin/main --to-ref HEAD`. + +- Select one of the following. + - [ ] I have added tests. + - `/test` for `lit` tests + - `/unittest` for C++ tests + - `/python/test` for end-to-end tests + - [x] This PR does not need a test because `FILL THIS IN`. + +- Select one of the following. + - [x] I have not added any `lit` tests. +- [ ] The `lit` tests I have added follow these [best +practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices), +including the "tests should be minimal" section. (Usually running Python +code + and using the instructions it generates is not minimal.) + +Signed-off-by: cunshunxia +--- + python/setup.py | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/python/setup.py b/python/setup.py +index da924502b..30c317328 100644 +--- a/python/setup.py ++++ b/python/setup.py +@@ -572,11 +572,6 @@ def get_entry_points(): + return entry_points + + +-def get_install_requires(): +- install_requires = ["filelock"] +- return install_requires +- +- + setup( + name=os.environ.get("TRITON_WHEEL_NAME", "triton"), + version="3.1.0" + os.environ.get("TRITON_WHEEL_VERSION_SUFFIX", ""), +@@ -586,7 +581,6 @@ setup( + long_description="", + packages=get_packages(), + entry_points=get_entry_points(), +- install_requires=get_install_requires(), + package_data=package_data, + include_package_data=True, + ext_modules=[CMakeExtension("triton", "triton/_C/")], +-- +2.47.1 + diff --git a/recipe/recipe.yaml b/recipe/recipe.yaml index 2cdc884..60d7691 100644 --- a/recipe/recipe.yaml +++ b/recipe/recipe.yaml @@ -38,6 +38,9 @@ source: - patches/0010-Use-system-PATH-to-find-tools-in-CONDA_PREFIX.patch # https://github.com/triton-lang/triton/commit/0591b3756bd4143b7163235c0eca4d718948e982 - patches/0011-Don-t-specify-A-x64-option-and-reuse-cmake-build-typ.patch + # https://github.com/triton-lang/triton/commit/3bfdbc0cba3e4838364bf6bd204fa522e1665458 + # (use removed earlier) + - patches/0012-remove-unused-requirement-filelock-4356.patch build: number: ${{ build_number }} @@ -71,7 +74,6 @@ requirements: - cuda-cupti-dev run: - python - - filelock - setuptools - cuda-nvcc - cuda-cuobjdump From 28fb36b09f395bb136ac03601860238c8a915a4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 28 Dec 2024 17:25:02 +0100 Subject: [PATCH 26/27] Restore env markers over CUDA version --- recipe/conda_build_config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index e46fbe9..66f77d3 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -21,10 +21,10 @@ fortran_compiler_version: # [linux64] - 13 # [linux64] cdt_name: # [linux64] - cos7 # [linux64] -cuda_compiler: - - cuda-nvcc -cuda_compiler_version: - - 12.6 +cuda_compiler: # [linux64 or win] + - cuda-nvcc # [linux64 or win] +cuda_compiler_version: # [linux64 or win] + - 12.6 # [linux64 or win] c_compiler: # [win] - clang # [win] cxx_compiler: # [win] From 6cf03d307678a3354ec2c3e78dad27510f711f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 28 Dec 2024 17:25:17 +0100 Subject: [PATCH 27/27] MNT: Re-rendered with conda-build 24.11.2, conda-smithy 3.45.1, and conda-forge-pinning 2024.12.27.18.01.51 --- .../osx_64_python3.10.____cpython.yaml | 40 ------- .../osx_64_python3.11.____cpython.yaml | 40 ------- .../osx_64_python3.12.____cpython.yaml | 40 ------- .ci_support/osx_64_python3.13.____cp313.yaml | 40 ------- .ci_support/osx_64_python3.9.____cpython.yaml | 40 ------- .scripts/run_osx_build.sh | 108 ------------------ README.md | 35 ------ azure-pipelines.yml | 3 +- 8 files changed, 1 insertion(+), 345 deletions(-) delete mode 100644 .ci_support/osx_64_python3.10.____cpython.yaml delete mode 100644 .ci_support/osx_64_python3.11.____cpython.yaml delete mode 100644 .ci_support/osx_64_python3.12.____cpython.yaml delete mode 100644 .ci_support/osx_64_python3.13.____cp313.yaml delete mode 100644 .ci_support/osx_64_python3.9.____cpython.yaml delete mode 100755 .scripts/run_osx_build.sh diff --git a/.ci_support/osx_64_python3.10.____cpython.yaml b/.ci_support/osx_64_python3.10.____cpython.yaml deleted file mode 100644 index c9920d7..0000000 --- a/.ci_support/osx_64_python3.10.____cpython.yaml +++ /dev/null @@ -1,40 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '10.13' -MACOSX_SDK_VERSION: -- '10.13' -c_stdlib: -- macosx_deployment_target -c_stdlib_version: -- '10.13' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cuda_compiler: -- cuda-nvcc -cuda_compiler_version: -- '12.6' -cxx_compiler: -- clangxx -cxx_compiler_version: -- '18' -libmlir: -- '19' -llvm: -- '19' -llvmdev: -- '19' -macos_machine: -- x86_64-apple-darwin13.4.0 -mlir: -- '19' -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.10.* *_cpython -target_platform: -- osx-64 -zlib: -- '1' diff --git a/.ci_support/osx_64_python3.11.____cpython.yaml b/.ci_support/osx_64_python3.11.____cpython.yaml deleted file mode 100644 index fc0b47e..0000000 --- a/.ci_support/osx_64_python3.11.____cpython.yaml +++ /dev/null @@ -1,40 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '10.13' -MACOSX_SDK_VERSION: -- '10.13' -c_stdlib: -- macosx_deployment_target -c_stdlib_version: -- '10.13' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cuda_compiler: -- cuda-nvcc -cuda_compiler_version: -- '12.6' -cxx_compiler: -- clangxx -cxx_compiler_version: -- '18' -libmlir: -- '19' -llvm: -- '19' -llvmdev: -- '19' -macos_machine: -- x86_64-apple-darwin13.4.0 -mlir: -- '19' -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.11.* *_cpython -target_platform: -- osx-64 -zlib: -- '1' diff --git a/.ci_support/osx_64_python3.12.____cpython.yaml b/.ci_support/osx_64_python3.12.____cpython.yaml deleted file mode 100644 index 1ea9cdb..0000000 --- a/.ci_support/osx_64_python3.12.____cpython.yaml +++ /dev/null @@ -1,40 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '10.13' -MACOSX_SDK_VERSION: -- '10.13' -c_stdlib: -- macosx_deployment_target -c_stdlib_version: -- '10.13' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cuda_compiler: -- cuda-nvcc -cuda_compiler_version: -- '12.6' -cxx_compiler: -- clangxx -cxx_compiler_version: -- '18' -libmlir: -- '19' -llvm: -- '19' -llvmdev: -- '19' -macos_machine: -- x86_64-apple-darwin13.4.0 -mlir: -- '19' -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.12.* *_cpython -target_platform: -- osx-64 -zlib: -- '1' diff --git a/.ci_support/osx_64_python3.13.____cp313.yaml b/.ci_support/osx_64_python3.13.____cp313.yaml deleted file mode 100644 index a4e141b..0000000 --- a/.ci_support/osx_64_python3.13.____cp313.yaml +++ /dev/null @@ -1,40 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '10.13' -MACOSX_SDK_VERSION: -- '10.13' -c_stdlib: -- macosx_deployment_target -c_stdlib_version: -- '10.13' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cuda_compiler: -- cuda-nvcc -cuda_compiler_version: -- '12.6' -cxx_compiler: -- clangxx -cxx_compiler_version: -- '18' -libmlir: -- '19' -llvm: -- '19' -llvmdev: -- '19' -macos_machine: -- x86_64-apple-darwin13.4.0 -mlir: -- '19' -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.13.* *_cp313 -target_platform: -- osx-64 -zlib: -- '1' diff --git a/.ci_support/osx_64_python3.9.____cpython.yaml b/.ci_support/osx_64_python3.9.____cpython.yaml deleted file mode 100644 index 46e24ce..0000000 --- a/.ci_support/osx_64_python3.9.____cpython.yaml +++ /dev/null @@ -1,40 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '10.13' -MACOSX_SDK_VERSION: -- '10.13' -c_stdlib: -- macosx_deployment_target -c_stdlib_version: -- '10.13' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cuda_compiler: -- cuda-nvcc -cuda_compiler_version: -- '12.6' -cxx_compiler: -- clangxx -cxx_compiler_version: -- '18' -libmlir: -- '19' -llvm: -- '19' -llvmdev: -- '19' -macos_machine: -- x86_64-apple-darwin13.4.0 -mlir: -- '19' -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.9.* *_cpython -target_platform: -- osx-64 -zlib: -- '1' diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh deleted file mode 100755 index ad5989a..0000000 --- a/.scripts/run_osx_build.sh +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/env bash - -# -*- mode: jinja-shell -*- - -source .scripts/logging_utils.sh - -set -xe - -MINIFORGE_HOME="${MINIFORGE_HOME:-${HOME}/miniforge3}" -MINIFORGE_HOME="${MINIFORGE_HOME%/}" # remove trailing slash -export CONDA_BLD_PATH="${CONDA_BLD_PATH:-${MINIFORGE_HOME}/conda-bld}" - -( startgroup "Provisioning base env with micromamba" ) 2> /dev/null -MICROMAMBA_VERSION="1.5.10-0" -if [[ "$(uname -m)" == "arm64" ]]; then - osx_arch="osx-arm64" -else - osx_arch="osx-64" -fi -MICROMAMBA_URL="https://github.com/mamba-org/micromamba-releases/releases/download/${MICROMAMBA_VERSION}/micromamba-${osx_arch}" -MAMBA_ROOT_PREFIX="${MINIFORGE_HOME}-micromamba-$(date +%s)" -echo "Downloading micromamba ${MICROMAMBA_VERSION}" -micromamba_exe="$(mktemp -d)/micromamba" -curl -L -o "${micromamba_exe}" "${MICROMAMBA_URL}" -chmod +x "${micromamba_exe}" -echo "Creating environment" -"${micromamba_exe}" create --yes --root-prefix "${MAMBA_ROOT_PREFIX}" --prefix "${MINIFORGE_HOME}" \ - --channel conda-forge \ - pip rattler-build conda-forge-ci-setup=4 "conda-build>=24.1" -echo "Moving pkgs cache from ${MAMBA_ROOT_PREFIX} to ${MINIFORGE_HOME}" -mv "${MAMBA_ROOT_PREFIX}/pkgs" "${MINIFORGE_HOME}" -echo "Cleaning up micromamba" -rm -rf "${MAMBA_ROOT_PREFIX}" "${micromamba_exe}" || true -( endgroup "Provisioning base env with micromamba" ) 2> /dev/null - -( startgroup "Configuring conda" ) 2> /dev/null -echo "Activating environment" -source "${MINIFORGE_HOME}/etc/profile.d/conda.sh" -conda activate base -export CONDA_SOLVER="libmamba" -export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 - - - - - -echo -e "\n\nSetting up the condarc and mangling the compiler." -setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml - -if [[ "${CI:-}" != "" ]]; then - mangle_compiler ./ ./recipe .ci_support/${CONFIG}.yaml -fi - -if [[ "${CI:-}" != "" ]]; then - echo -e "\n\nMangling homebrew in the CI to avoid conflicts." - /usr/bin/sudo mangle_homebrew - /usr/bin/sudo -k -else - echo -e "\n\nNot mangling homebrew as we are not running in CI" -fi - -if [[ "${sha:-}" == "" ]]; then - sha=$(git rev-parse HEAD) -fi - -echo -e "\n\nRunning the build setup script." -source run_conda_forge_build_setup - - - -( endgroup "Configuring conda" ) 2> /dev/null - -if [[ -f LICENSE.txt ]]; then - cp LICENSE.txt "recipe/recipe-scripts-license.txt" -fi - -if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then - echo "rattler-build does not currently support debug mode" -else - - rattler-build build --recipe ./recipe \ - -m ./.ci_support/${CONFIG}.yaml \ - ${EXTRA_CB_OPTIONS:-} \ - --target-platform "${HOST_PLATFORM}" \ - --extra-meta flow_run_id="$flow_run_id" \ - --extra-meta remote_url="$remote_url" \ - --extra-meta sha="$sha" - - ( startgroup "Inspecting artifacts" ) 2> /dev/null - - # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 - command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir ./recipe -m ./.ci_support/${CONFIG}.yaml || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" - - ( endgroup "Inspecting artifacts" ) 2> /dev/null - ( startgroup "Validating outputs" ) 2> /dev/null - - validate_recipe_outputs "${FEEDSTOCK_NAME}" - - ( endgroup "Validating outputs" ) 2> /dev/null - - ( startgroup "Uploading packages" ) 2> /dev/null - - if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then - upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml - fi - - ( endgroup "Uploading packages" ) 2> /dev/null -fi \ No newline at end of file diff --git a/README.md b/README.md index fed3625..f01ce9a 100644 --- a/README.md +++ b/README.md @@ -68,41 +68,6 @@ Current build status variant - - - - - - - - - - - - - - -
VariantStatus
win_64_python3.10.____cpythonlinux_64_python3.10.____cpython - variant + variant
win_64_python3.11.____cpythonlinux_64_python3.11.____cpython - variant + variant
win_64_python3.12.____cpythonlinux_64_python3.12.____cpython - variant + variant
win_64_python3.13.____cp313linux_64_python3.13.____cp313 - variant + variant
win_64_python3.9.____cpythonlinux_64_python3.9.____cpython - variant + variant + +
osx_64_python3.10.____cpython + + variant + +
osx_64_python3.11.____cpython + + variant + +
osx_64_python3.12.____cpython + + variant + +
osx_64_python3.13.____cp313 + + variant + +
osx_64_python3.9.____cpython + + variant
osx_64_python3.10.____cpython - - variant - -
osx_64_python3.11.____cpython - - variant - -
osx_64_python3.12.____cpython - - variant - -
osx_64_python3.13.____cp313 - - variant - -
osx_64_python3.9.____cpython - - variant - -
diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 013bdc1..d309e84 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,5 +28,4 @@ stages: condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true')) dependsOn: Check jobs: - - template: ./.azure-pipelines/azure-pipelines-linux.yml - - template: ./.azure-pipelines/azure-pipelines-osx.yml \ No newline at end of file + - template: ./.azure-pipelines/azure-pipelines-linux.yml \ No newline at end of file