Skip to content

Fix pinnings for ppc64le with enabled CUDA#7684

Merged
h-vetinari merged 1 commit into
conda-forge:mainfrom
mpigou:fix-ppc64le-cuda
Aug 21, 2025
Merged

Fix pinnings for ppc64le with enabled CUDA#7684
h-vetinari merged 1 commit into
conda-forge:mainfrom
mpigou:fix-ppc64le-cuda

Conversation

@mpigou

@mpigou mpigou commented Aug 21, 2025

Copy link
Copy Markdown
Contributor

Following the merges of #7660 and #7653, the rerender of my recipe fails with:

ValueError: Variant configuration errors in /home/fs/.cache/conda-smithy/conda_build_config.yaml:
  zip fields in zip_key group frozenset(
    {'cuda_compiler_version',
     'c_stdlib_version',
     'cxx_compiler_version',
     'fortran_compiler_version',
     'c_compiler_version'}
  ) are not all the same length

This is due to having two output packages, one without CUDA support but built for all platforms including linux_ppc64le, and one with CUDA support but restricted to linux_64 and linux_aarch64. In this edge case, for the linux_ppc64le platform, the resulting pinnings are:

c_compiler_version:            # [unix]
  - 14                         # [linux]
c_stdlib_version:              # [unix]
  - 2.17                       # [linux]
  - 2.17                       # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
cxx_compiler_version:          # [unix]
  - 14                         # [linux]
fortran_compiler_version:      # [unix or win64]
  - 14                         # [linux]
cuda_compiler_version:
  - None

I thus propose using the same selector on c_stdlib_version than on other keys to remove the second entry for the ppc64le platform:

c_stdlib_version:              # [unix]
  - 2.17                       # [linux]
  - 2.17                       # [linux and not ppc64le and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
  - 10.13                      # [osx and x86_64]
  - 11.0                       # [osx and arm64]

Following the merge of conda-forge#7660, the rerender of my recipe fails with:

```
ValueError: Variant configuration errors in /home/fs/.cache/conda-smithy/conda_build_config.yaml:
  zip fields in zip_key group frozenset({'cuda_compiler_version', 'c_stdlib_version', 'cxx_compiler_version', 'fortran_compiler_version', 'c_compiler_version'}) are not all the same length
```

This is due to having two output packages, one without CUDA support but built for all platforms including ppc64le, and one with CUDA support but restricted to `linux_64` and `linux_aarch64`.
With the current pinning, for the `linux_ppc64le` platform, the resulting pinnings are:

```yaml
c_compiler_version:            # [unix]
  - 14                         # [linux]
c_stdlib_version:              # [unix]
  - 2.17                       # [linux]
  - 2.17                       # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
cxx_compiler_version:          # [unix]
  - 14                         # [linux]
fortran_compiler_version:      # [unix or win64]
  - 14                         # [linux]
cuda_compiler_version:
  - None
```
@mpigou mpigou requested a review from a team as a code owner August 21, 2025 08:58
@conda-forge-admin

Copy link
Copy Markdown
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

@h-vetinari h-vetinari left a comment

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.

Thank you very much. Indeed, that was due to those two PRs crossing wires.

@h-vetinari

Copy link
Copy Markdown
Member

I also double-checked that we don't need the same selector modification here:

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

This is fine because the cuda 11.8 migrator sets c_stdlib_version unconditionally.

@h-vetinari h-vetinari merged commit 6ed8a08 into conda-forge:main Aug 21, 2025
3 checks passed
@mpigou mpigou deleted the fix-ppc64le-cuda branch August 21, 2025 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants