Skip to content

Key CUDA, Python, and coverage ccaches on the CPU - #267

Merged
zfergus merged 1 commit into
mainfrom
fix/cpu-keyed-ccache
Oct 11, 2026
Merged

zfergus merged 1 commit into
mainfrom
fix/cpu-keyed-ccache

Conversation

@zfergus

@zfergus zfergus commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Description

Key the ccache in the CUDA, Python, and coverage workflows on the runner's CPU, as continuous.yml already does.

  • FindSIMD builds with -march=native, but ccache hashes the flag string, not the CPU it expands to.
  • These three workflows restored one fixed cache (e.g. Linux-Debug-cache) onto whichever CPU the next runner had.
  • Objects built on one CPU then mix with objects compiled fresh on another, and xsimd::default_arch can differ between them.
  • This is the suspected cause of the ipc_toolkit_tests link failure in #265: undefined references to xsimd::batch<…, avx512vnni<avx512vbmi2>> that main's CUDA run did not hit. It is unconfirmed.

Changes

  • cuda.yml, coverage.yml: add a Linux CPU fingerprint step (hash of model name in /proc/cpuinfo).
  • python.yml: add the same step for Linux, macOS, and Windows, copied from continuous.yml.
  • Cache keys gain ${{ env.CPU_KEY }}. Old keys (Linux-Debug-cache, coverage-cache, …) are no longer restored.

Impact

  • The first run on each CPU model starts with a cold cache, so expect one slow CUDA build per runner type.
  • Keys are one entry per (OS, config, CPU), so the cache list grows and old entries age out.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Workflow YAML parses (yaml.safe_load on all three files).
  • CUDA, Python, and coverage jobs on this PR run with the new keys. The first run is cold by design.

Checklist

  • I have commented my code, particularly in hard-to-understand areas

- Port the CPU fingerprint from continuous.yml so -march=native objects only restore onto matching hardware
@codecov

codecov Bot commented Oct 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.92%. Comparing base (0985885) to head (adcb0d0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #267   +/-   ##
=======================================
  Coverage   96.92%   96.92%           
=======================================
  Files         194      194           
  Lines       17348    17349    +1     
  Branches      943      943           
=======================================
+ Hits        16814    16815    +1     
  Misses        534      534           
Flag Coverage Δ
unittests 96.92% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zfergus
zfergus merged commit 61ff288 into main Oct 11, 2026
8 checks passed
@zfergus
zfergus deleted the fix/cpu-keyed-ccache branch October 11, 2026 13:19
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.

1 participant