Skip to content

simd-matrix: key native-resolving caches by the runner's target features - #345

Merged
AdaWorldAPI merged 1 commit into
masterfrom
ccr-b2e415d9-4jfvyk-ci-cache
Oct 8, 2026
Merged

AdaWorldAPI merged 1 commit into
masterfrom
ccr-b2e415d9-4jfvyk-ci-cache

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Problem

On #344, realization/nightly × x86_64 failed with SIGILL inside a cached proc-macro, before any test ran:

target/debug/build/paste/…/libpaste-….so(+0x3595f)
error: rustc interrupted by SIGILL

The nightly and host-native rows build under the repo's target-cpu=native default, and with no global RUSTFLAGS that also applies to host artifacts such as proc-macros. The ubuntu-latest pool is heterogeneous: the workflow's own host-native comment records an AVX-512 runner and a non-AVX-512 runner in one run. Both rows cache under a key that depends only on the job (key: nightly, or the default for host-native). A proc-macro .so compiled for one runner's CPU is therefore restored on another, and rustc dies loading it.

Fix

Both rows now hash the target features rustc resolves for native on the runner and add the hash to the cache key (rust-cache's key is added to its automatic job key):

- name: native target features (cache key)
  id: cpu
  run: echo "features=$(rustc +nightly --print cfg -C target-cpu=native | grep target_feature | sha256sum | cut -c1-16)" >> "$GITHUB_OUTPUT"
- uses: Swatinem/rust-cache@v2
  with:
    key: nightly-${{ steps.cpu.outputs.features }}

The key is exactly what decides those artifacts. Runners with the same feature set share a cache, and different ones never do.

Scope

  • Changed: only the nightly and host-native rows. They are the only rows whose artifacts depend on the runner's CPU.
  • native: pins v3, so its artifacts are the same on every runner.
  • native-v4: pins v4, so the same holds.
  • neon and wasm: they cross-compile to other targets.
  • ci.yaml: its workflow-global RUSTFLAGS: -D warnings replaces the config's target-cpu, so native never applies there.

Verification

  • The YAML parses.
  • The key command runs locally and yields a 16-hex-digit hash over 32 resolved features.
  • The fix itself can only be confirmed by a run that lands on mixed runners. This PR's own nightly row is its first exercise.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EFw2WdKr1oxvaKCJC2ua2R


Generated by Claude Code

…eatures

The nightly and host-native rows build under target-cpu=native on a
heterogeneous runner pool, but cached under a job-only key. A proc-macro
.so compiled for one runner's CPU was restored on another and rustc died
loading it (SIGILL in the cached paste .so, ndarray #344). Key both caches
by the target features rustc resolves for native on the runner.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EFw2WdKr1oxvaKCJC2ua2R
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 9ca996f2-f728-49fb-b4a1-cf568d82234d
📥 Commits

Reviewing files that changed from the base of the PR and between 334dee5 and 11c3267.

📒 Files selected for processing (1)
  • .github/workflows/simd-matrix.yaml
 _________________________________________________________________
< I am below the bugs. I am above the bugs. I am around the bugs. >
 -----------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Comment @coderabbitai help to get the list of available commands.

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 8, 2026 22:44
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T22:45:25.041866Z 11c3267 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@AdaWorldAPI
AdaWorldAPI merged commit 6704865 into master Oct 8, 2026
25 of 26 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.

2 participants