Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbell10 committed Nov 20, 2024
1 parent 9fe6699 commit f1b766d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 14 deletions.
29 changes: 19 additions & 10 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ jobs:
strategy:
matrix:
runner: ${{fromJson(needs.Runner-Preparation.outputs.matrix-CUDA)}}
env:
RUNNER_TYPE: ${{ matrix.runner[0] }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -201,6 +203,7 @@ jobs:
# "restore" step. This is to prevent the caches from accumulating stale
# files over time.
name: Restore cache of ccache and Triton compilation artifacts
id: restore-build-cache
if: github.ref != 'refs/heads/main'
uses: actions/cache/restore@v4
with:
Expand All @@ -209,8 +212,8 @@ jobs:
~/.cache/ccache
# Restore the most recent cache entry.
restore-keys: |
triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ matrix.runner[0] }}-llvm-${{ steps.cache-key.outputs.llvm }}-
triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ matrix.runner[0] }}-
triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ env.RUNNER_TYPE }}-llvm-${{ steps.cache-key.outputs.llvm }}-
triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ env.RUNNER_TYPE }}-
# We expect this cache key never to hit and for us to fall back
# unconditionally to the restore-key, so it doesn't actually matter
# what we put here (so long as it doesn't hit an existing key).
Expand Down Expand Up @@ -310,12 +313,14 @@ jobs:
path: |
~/.triton/cache
~/.cache/ccache
key: triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ matrix.runner }}-llvm-${{ steps.cache-key.outputs.llvm }}-${{ steps.cache-key.outputs.datetime }}
key: ${{ steps.restore-build-cache.outputs.cache-primary-key }}
Integration-Tests-AMD:
needs: Runner-Preparation
if: needs.Runner-Preparation.outputs.matrix-HIP != ''
runs-on: ${{ matrix.runner }}
timeout-minutes: 30
env:
RUNNER_TYPE: ${{ matrix.runner[1] }}
strategy:
matrix:
runner: ${{fromJson(needs.Runner-Preparation.outputs.matrix-HIP)}}
Expand Down Expand Up @@ -368,6 +373,7 @@ jobs:
# "restore" step. This is to prevent the caches from accumulating stale
# files over time.
name: Restore cache of ccache and Triton compilation artifacts
id: restore-build-cache
if: github.ref != 'refs/heads/main'
uses: actions/cache/restore@v4
with:
Expand All @@ -376,8 +382,8 @@ jobs:
~/.cache/ccache
# Restore the most recent cache entry.
restore-keys: |
triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ matrix.runner[0] }}-llvm-${{ steps.cache-key.outputs.llvm }}-
triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ matrix.runner[0] }}-
triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ env.RUNNER_TYPE }}-llvm-${{ steps.cache-key.outputs.llvm }}-
triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ env.RUNNER_TYPE }}-
# We expect this cache key never to hit and for us to fall back
# unconditionally to the restore-key, so it doesn't actually matter
# what we put here (so long as it doesn't hit an existing key).
Expand Down Expand Up @@ -479,7 +485,7 @@ jobs:
path: |
~/.triton/cache
~/.cache/ccache
key: triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ matrix.runner }}-llvm-${{ steps.cache-key.outputs.llvm }}-${{ steps.cache-key.outputs.datetime }}
key: ${{ steps.restore-build-cache.outputs.cache-primary-key }}
- name: Clean up caches
run: |
rm -rf ~/.triton/cache
Expand All @@ -491,6 +497,8 @@ jobs:
strategy:
matrix:
runner: ${{fromJson(needs.Runner-Preparation.outputs.matrix-MACOS)}}
env:
RUNNER_TYPE: ${{ matrix.runner[0] }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -540,6 +548,7 @@ jobs:
# "restore" step. This is to prevent the caches from accumulating stale
# files over time.
name: Restore cache of ccache and Triton compilation artifacts
id: restore-build-cache
if: github.ref != 'refs/heads/main'
uses: actions/cache/restore@v4
with:
Expand All @@ -548,8 +557,8 @@ jobs:
~/.cache/ccache
# Restore the most recent cache entry.
restore-keys: |
triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ matrix.runner[0] }}-llvm-${{ steps.cache-key.outputs.llvm }}-
triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ matrix.runner[0] }}-
triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ env.RUNNER_TYPE }}-llvm-${{ steps.cache-key.outputs.llvm }}-
triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ env.RUNNER_TYPE }}-
# We expect this cache key never to hit and for us to fall back
# unconditionally to the restore-key, so it doesn't actually matter
# what we put here (so long as it doesn't hit an existing key).
Expand Down Expand Up @@ -584,7 +593,7 @@ jobs:
echo "PATH is '$PATH'"
cd python
ccache --zero-stats
export CCACHE_PATH="~/.cache/ccache"
export CCACHE_DIR="~/.cache/ccache"
python3 -m pip install -v --no-build-isolation .
- name: CCache Stats
run: ccache --print-stats
Expand All @@ -609,4 +618,4 @@ jobs:
path: |
~/.triton/cache
~/.cache/ccache
key: triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ matrix.runner }}-llvm-${{ steps.cache-key.outputs.llvm }}-${{ steps.cache-key.outputs.datetime }}
key: ${{ steps.restore-build-cache.outputs.cache-primary-key }}
19 changes: 15 additions & 4 deletions .github/workflows/integration-tests.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ jobs:
matrix:
runner: ${{fromJson(needs.Runner-Preparation.outputs.matrix-CUDA)}}

env:
RUNNER_TYPE: ${{ matrix.runner[0] }}

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -227,6 +230,7 @@ jobs:
# files over time.
- &restore-build-artifacts-step
name: Restore cache of ccache and Triton compilation artifacts
id: restore-build-cache
if: github.ref != 'refs/heads/main'
uses: actions/cache/restore@v4
with:
Expand All @@ -235,8 +239,8 @@ jobs:
~/.cache/ccache
# Restore the most recent cache entry.
restore-keys: |
triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ matrix.runner[0] }}-llvm-${{ steps.cache-key.outputs.llvm }}-
triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ matrix.runner[0] }}-
triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ env.RUNNER_TYPE }}-llvm-${{ steps.cache-key.outputs.llvm }}-
triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ env.RUNNER_TYPE }}-
# We expect this cache key never to hit and for us to fall back
# unconditionally to the restore-key, so it doesn't actually matter
# what we put here (so long as it doesn't hit an existing key).
Expand Down Expand Up @@ -347,7 +351,7 @@ jobs:
path: |
~/.triton/cache
~/.cache/ccache
key: triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ matrix.runner }}-llvm-${{ steps.cache-key.outputs.llvm }}-${{ steps.cache-key.outputs.datetime }}
key: ${{ steps.restore-build-cache.outputs.cache-primary-key }}

Integration-Tests-AMD:
needs: Runner-Preparation
Expand All @@ -356,6 +360,9 @@ jobs:
runs-on: ${{ matrix.runner }}
timeout-minutes: 30

env:
RUNNER_TYPE: ${{ matrix.runner[1] }}

strategy:
matrix:
runner: ${{fromJson(needs.Runner-Preparation.outputs.matrix-HIP)}}
Expand Down Expand Up @@ -451,6 +458,10 @@ jobs:
strategy:
matrix:
runner: ${{fromJson(needs.Runner-Preparation.outputs.matrix-MACOS)}}

env:
RUNNER_TYPE: ${{ matrix.runner[0] }}

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -487,7 +498,7 @@ jobs:
echo "PATH is '$PATH'"
cd python
ccache --zero-stats
export CCACHE_PATH="~/.cache/ccache"
export CCACHE_DIR="~/.cache/ccache"
python3 -m pip install -v --no-build-isolation .

- *print-ccache-stats
Expand Down

0 comments on commit f1b766d

Please sign in to comment.