From fa95056341a0d03270abc656944586091c33ce25 Mon Sep 17 00:00:00 2001 From: danielhanchen Date: Sat, 8 Aug 2026 05:30:23 +0000 Subject: [PATCH] CI: let a cold CUDA profile warm its ccache from a sibling profile --- .github/workflows/unsloth-prebuilt-cuda-windows.yml | 8 ++++++++ .github/workflows/unsloth-prebuilt-cuda.yml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/unsloth-prebuilt-cuda-windows.yml b/.github/workflows/unsloth-prebuilt-cuda-windows.yml index 16772e29d59c..82fdcad0d110 100644 --- a/.github/workflows/unsloth-prebuilt-cuda-windows.yml +++ b/.github/workflows/unsloth-prebuilt-cuda-windows.yml @@ -118,8 +118,16 @@ jobs: uses: hendrikmuhs/ccache-action@v1.2.23 with: key: cuda-${{ matrix.cuda }}-windows-${{ matrix.profile }}-${{ inputs.tag }} + # The second, broader key is a fallback: when this profile has no + # cache of its own (first build of a new profile, or its last save was + # lost) it warms from a sibling profile of the same CUDA line and OS + # instead of starting cold. Only the CUDA arch list differs between + # profiles, and that affects .cu compilation only, so every plain C++ + # translation unit -- the large majority -- has a byte-identical + # command line and hits. restore-keys: | cuda-${{ matrix.cuda }}-windows-${{ matrix.profile }} + cuda-${{ matrix.cuda }}-windows- append-timestamp: false variant: ccache max-size: 2G diff --git a/.github/workflows/unsloth-prebuilt-cuda.yml b/.github/workflows/unsloth-prebuilt-cuda.yml index 29d188aeea21..342e5d62d7b4 100644 --- a/.github/workflows/unsloth-prebuilt-cuda.yml +++ b/.github/workflows/unsloth-prebuilt-cuda.yml @@ -96,8 +96,16 @@ jobs: uses: hendrikmuhs/ccache-action@v1.2.23 with: key: cuda-${{ matrix.cuda }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ inputs.tag }} + # The second, broader key is a fallback: when this profile has no + # cache of its own (first build of a new profile, or its last save was + # lost) it warms from a sibling profile of the same CUDA line and OS + # instead of starting cold. Only the CUDA arch list differs between + # profiles, and that affects .cu compilation only, so every plain C++ + # translation unit -- the large majority -- has a byte-identical + # command line and hits. restore-keys: | cuda-${{ matrix.cuda }}-${{ matrix.arch }}-${{ matrix.profile }} + cuda-${{ matrix.cuda }}-${{ matrix.arch }}- append-timestamp: false variant: ccache max-size: 2G