Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ c_compiler_version: # [unix]
- 12 # [linux]
- 16 # [osx]
- 10 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux]
- 11 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux]
cxx_compiler:
- gxx # [linux]
- clangxx # [osx]
Expand All @@ -16,6 +17,7 @@ cxx_compiler_version: # [unix]
- 12 # [linux]
- 16 # [osx]
- 10 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux]
- 11 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux]
llvm_openmp: # [osx]
- 16 # [osx]
fortran_compiler: # [unix or win64]
Expand All @@ -27,6 +29,7 @@ fortran_compiler_version: # [unix or win64]
- 12 # [osx]
- 5 # [win64]
- 10 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux]
- 11 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux]
m2w64_c_compiler: # [win]
- m2w64-toolchain # [win]
m2w64_cxx_compiler: # [win]
Expand All @@ -37,12 +40,15 @@ m2w64_fortran_compiler: # [win]
cuda_compiler:
- None
- nvcc # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- nvcc # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
cuda_compiler_version:
- None
- 11.2 # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 11.8 # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
cuda_compiler_version_min:
- None # [osx]
- 11.2 # [linux or win64]
- 11.8 # [linux or win64]

arm_variant_type: # [aarch64]
- sbsa # [aarch64]
Expand Down Expand Up @@ -115,6 +121,7 @@ cdt_name: # [linux]
- cos7 # [linux and s390x]

- cos7 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- cos7 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]

docker_image: # [os.environ.get("BUILD_PLATFORM", "").startswith("linux-")]
# Native builds
Expand All @@ -132,6 +139,15 @@ docker_image: # [os.environ.get("BUILD_PLATFOR
- quay.io/condaforge/linux-anvil-cuda:11.2 # [ppc64le and os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-64"]
- quay.io/condaforge/linux-anvil-cuda:11.2 # [aarch64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-64"]

# CUDA 11.8
- quay.io/condaforge/linux-anvil-cuda:11.8 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-64"]
# CUDA 11.8 arch: native compilation (build == target)
- quay.io/condaforge/linux-anvil-ppc64le-cuda:11.8 # [ppc64le and os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-ppc64le"]
- quay.io/condaforge/linux-anvil-aarch64-cuda:11.8 # [aarch64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-aarch64"]
# CUDA 11.8 arch: cross-compilation (build != target)
- quay.io/condaforge/linux-anvil-cuda:11.8 # [ppc64le and os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-64"]
- quay.io/condaforge/linux-anvil-cuda:11.8 # [aarch64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-64"]

zip_keys:
- # [unix]
- c_compiler_version # [unix]
Expand Down
99 changes: 0 additions & 99 deletions recipe/migrations/cuda118.yaml

This file was deleted.

13 changes: 13 additions & 0 deletions recipe/migrations/cuda120.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,25 @@ __migrator:
- quay.io/condaforge/linux-anvil-cuda:10.2 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"]
- quay.io/condaforge/linux-anvil-cuda:11.0 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"]
- quay.io/condaforge/linux-anvil-cuda:11.1 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"]

# case: CUDA 11.2
- quay.io/condaforge/linux-anvil-cuda:11.2 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"]
# case: native compilation (build == target)
- quay.io/condaforge/linux-anvil-ppc64le-cuda:11.2 # [ppc64le and os.environ.get("BUILD_PLATFORM") == "linux-ppc64le"]
- quay.io/condaforge/linux-anvil-aarch64-cuda:11.2 # [aarch64 and os.environ.get("BUILD_PLATFORM") == "linux-aarch64"]
# case: cross-compilation (build != target)
- quay.io/condaforge/linux-anvil-cuda:11.2 # [ppc64le and os.environ.get("BUILD_PLATFORM") == "linux-64"]
- quay.io/condaforge/linux-anvil-cuda:11.2 # [aarch64 and os.environ.get("BUILD_PLATFORM") == "linux-64"]

# case: CUDA 11.8
- quay.io/condaforge/linux-anvil-cuda:11.8 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"]
# case: native compilation (build == target)
- quay.io/condaforge/linux-anvil-ppc64le-cuda:11.8 # [ppc64le and os.environ.get("BUILD_PLATFORM") == "linux-ppc64le"]
- quay.io/condaforge/linux-anvil-aarch64-cuda:11.8 # [aarch64 and os.environ.get("BUILD_PLATFORM") == "linux-aarch64"]
# case: cross-compilation (build != target)
- quay.io/condaforge/linux-anvil-cuda:11.8 # [ppc64le and os.environ.get("BUILD_PLATFORM") == "linux-64"]
- quay.io/condaforge/linux-anvil-cuda:11.8 # [aarch64 and os.environ.get("BUILD_PLATFORM") == "linux-64"]

# case: non-CUDA builds
- quay.io/condaforge/linux-anvil-cos7-x86_64 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"]
cuda_compiler_version:
Expand All @@ -51,6 +63,7 @@ __migrator:
- 11.0 # [(linux64 or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 11.1 # [(linux64 or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 11.2 # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 11.8 # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When applying these changes to feedstocks with the CUDA 12.0 migrator, found that re-rendering would error due to the ordering not including 11.8. So have added it here

However this means feedstocks would run into this issue as well. With these changes they would need to refresh the CUDA 12.0 migrator. Alternatively we could restart this migrator to ensure the new YAML is added. Though that feels like unnecessary extra effort for maintainers. Not sure if there are better options

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However this means feedstocks would run into this issue as well. With these changes they would need to refresh the CUDA 12.0 migrator.

If you update it here in the pinning repo, every feedstock that has .ci_support/migrations/cuda120.yaml will use that updated variant unless they set use_local: true. No need to restart anything.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the feedstocks automatically pick up this change, great!

Had the impression that was not the case, but would be happy to be wrong

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep you are right

Confirmed by testing this locally with conda-smithy's --exclusive-config-file flag

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have since done a few re-renders on feedstocks with both the CUDA 11.8 & 12 migrator included without issues

For the use_local: true case, searched through the feedstocks and found a handful that were affected. Submitted PRs to them to refresh their CUDA 12 migrators so that re-render works. Added some background in the PRs for context

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the use_local: true workaround was added by feedstocks working around a CUDA 12 + GCC 12 + pybind11 bug ( pybind/pybind11#4606 ), pybind11 made a fix ( pybind/pybind11@3414c56 ), which was released in pybind11 version 2.12.0. Coincidentally the same version that included the NumPy 2 fixes that we also need ( pybind/pybind11@705efcc ). This newer version of pybind11 was packaged in conda-forge earlier this year ( conda-forge/pybind11-feedstock#94 ). So for feedstocks using pybind11 directly, simply getting the latest version in conda-forge was sufficient for them to drop these workarounds

However the other issue we had was feedstocks that use PyTorch got pybind11 from a vendored copy in PyTorch (not the package). This comes up when a package #includes PyTorch's headers. Fortunately PyTorch upgraded its version of pybind11 to 2.12.0 as part of their NumPy 2 upgrade effort ( pytorch/pytorch@6c2f36c ). This was released in PyTorch version 2.4.0, which was recently packaged in conda-forge ( conda-forge/pytorch-cpu-feedstock#250 ). This allowed the remaining workarounds to be dropped

While some of these workarounds were removed organically over time, a few were still around recently. So have worked with maintainers to clean these out. At this point, I see none of the original vendored CUDA 12 migrators

There are other cases where the CUDA 12 migrator is vendored. However this is usually done in packages where they build against the latest CUDA 12 and can continue to support older CUDA 12's. So this is irrelevant in this context

Mentioning here as the other context is in this thread or xref'd below. So this seemed like the natural place to include this information

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're commenting on the wrong PR...?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment relates to both PRs, but felt more natural here given more relevant context here

Also wanted to reference it in the other PR as done in comment: #6263 (comment)

Assuming that was the PR you had in mind

- 12.0 # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
commit_message: |
Rebuild for CUDA 12 w/arch + Windows support
Expand Down