Skip to content

fix: concretizer: max_dupes: llvm: 1 - #376

Merged
wdconinc merged 12 commits into
masterfrom
llvm-buildable-false
Aug 4, 2026
Merged

fix: concretizer: max_dupes: llvm: 1#376
wdconinc merged 12 commits into
masterfrom
llvm-buildable-false

Conversation

@wdconinc

@wdconinc wdconinc commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Briefly, what does this PR introduce? Please link to any relevant presentations or discussions.

This PR defines the default maximum instances of llvm in spack environments to be one, requiring the use of the external (system) llvm. This is only overridden in the Julia environment which requires a special llvm. In general, this avoids installing additional surprise llvm versions that bloat the container size in e.g. cuda, tf.

In order to make tensorflow possible with the external llvm-20 (from the point of view of spack), we ensure that the right system packages are installed and that spack indeed allows the clang python bindings to come from llvm installs.

What is the urgency of this PR?

  • High (please describe reason below)
  • Medium
  • Low

What kind of change does this PR introduce?

  • Bug fix (issue: avoid llvm installed)
  • New feature (issue #__)
  • Optimization (issue #__)
  • Updated documentation
  • other: __

Please check if any of the following apply

  • This PR introduces breaking changes. Please describe changes users need to make below.
  • This PR changes default behavior. Please describe changes below.
  • AI was used in preparing this PR. Please describe usage below.

Copilot AI review requested due to automatic review settings August 1, 2026 16:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Debian base-image Spack configuration to treat LLVM as an external-only dependency by marking it not buildable during external discovery, helping prevent unintended extra LLVM builds that can increase container size.

Changes:

  • Update spack external find invocation for llvm to use --not-buildable, aligning LLVM handling with other externals like gcc and cuda.

Copilot AI review requested due to automatic review settings August 1, 2026 22:09

This comment was marked as duplicate.

Copilot AI review requested due to automatic review settings August 1, 2026 23:17

This comment was marked as duplicate.

@wdconinc
wdconinc enabled auto-merge (squash) August 2, 2026 02:53
@wdconinc
wdconinc requested a review from a team August 2, 2026 02:54
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

Capybara summary for PR 376

Copilot AI review requested due to automatic review settings August 2, 2026 13:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread spack-environment/tf/spack.yaml Outdated
Copilot AI review requested due to automatic review settings August 2, 2026 13:55

This comment was marked as duplicate.

Copilot AI review requested due to automatic review settings August 2, 2026 14:00
@wdconinc wdconinc changed the title fix: packages: llvm: buildable: false fix: concretizer: max_dupes: llvm: 1 Aug 2, 2026

This comment was marked as duplicate.

Copilot AI review requested due to automatic review settings August 2, 2026 14:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

spack-environment/tf/spack.yaml:1

  • This file now starts with external: instead of the required top-level spack: key used by all other Spack environments in this repo. As written, this is not a valid Spack environment configuration and will break spack env activate / concretization for the tf environment.
spack:

Comment thread containers/debian/Dockerfile
Copilot AI review requested due to automatic review settings August 2, 2026 14:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Suppressed comments (3)

containers/debian/Dockerfile:296

  • The LLVM external spec is being patched with yq before spack external find --scope spack llvm runs later in the Dockerfile. Since spack external find can rewrite/refresh packages.yaml, this ordering risks losing the +python targets=all tweak needed by downstream packages (e.g. py-tensorflow libclang bindings). Apply the yq patch immediately after the external is discovered (and guard it when no externals are present) so the final config is deterministic.
# Ensure LLVM externals satisfy iwyu variant requirements (targets=all)
yq -iy '.packages.llvm.externals[].spec += " +python targets=all"' ${SPACK_ROOT}/etc/spack/packages.yaml
spack config blame compilers
spack config blame packages
EOF

spack-environment/tf/spack.yaml:6

  • This change removes the TensorFlow environment’s local llvm: 2 override so it inherits the new default llvm: 1. However, spack-environment/tf/epic/spack.yaml still sets concretizer:duplicates:max_dupes: llvm: 2, which contradicts the PR description’s claim that only the Julia environment overrides the default and may reintroduce duplicate LLVM in the TF epic environment.
  include:
  - ../concretizer.yaml
  - ../config.yaml
  - ../packages.yaml
  - ../view.yaml

spack-environment/concretizer.yaml:19

  • Now that concretizer.yaml defines a default duplicate policy (llvm: 1), the header comment above is slightly misleading when it implies duplicate allowances live only in per-environment spack.yaml files. Updating that comment will help future maintainers understand where defaults vs overrides belong.
  duplicates:
    max_dupes:
      llvm: 1

Copilot AI review requested due to automatic review settings August 2, 2026 14:24
Copilot AI review requested due to automatic review settings August 2, 2026 19:18
@wdconinc
wdconinc force-pushed the llvm-buildable-false branch from 5b7e074 to c210ea0 Compare August 2, 2026 19:18
@wdconinc
wdconinc removed the request for review from Copilot August 2, 2026 19:18
@wdconinc
wdconinc requested review from Copilot and removed request for Copilot August 2, 2026 19:18
@wdconinc
wdconinc requested review from Copilot and removed request for Copilot August 3, 2026 14:01
@wdconinc
wdconinc requested review from Copilot and removed request for Copilot August 3, 2026 16:10
@wdconinc wdconinc mentioned this pull request Aug 3, 2026
@wdconinc
wdconinc merged commit facdd01 into master Aug 4, 2026
115 of 141 checks passed
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