char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Sigbjørn Skjæretci : move more jobs to ccache-buckets (#28375)8b4b3558f

char/aliceai-t5-moe
3.0 KiB106 linesraw
1name: HIP quality check
2
3on:
4  workflow_dispatch: # allows manual triggering
5  push:
6    branches:
7      - master
8    paths: [
9      '.github/workflows/hip-quality-check.yml',
10      '**/*.cu',
11      '**/*.cuh',
12      'ggml/src/ggml-hip/CMakeLists.txt',
13      'ggml/src/ggml-cuda/vendors/hip.h',
14      'scripts/hip/gcn-cdna-vgpr-check.py'
15    ]
16
17  pull_request:
18    types: [opened, synchronize, reopened]
19    paths: [
20      '.github/workflows/hip-quality-check.yml',
21      '**/*.cu',
22      '**/*.cuh',
23      'ggml/src/ggml-hip/CMakeLists.txt',
24      'ggml/src/ggml-cuda/vendors/hip.h',
25      'scripts/hip/gcn-cdna-vgpr-check.py'
26    ]
27
28concurrency:
29  group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
30  cancel-in-progress: true
31
32env:
33  GGML_NLOOP: 3
34  GGML_N_THREADS: 1
35  LLAMA_ARG_LOG_COLORS: 1
36  LLAMA_ARG_LOG_PREFIX: 1
37  LLAMA_ARG_LOG_TIMESTAMPS: 1
38
39jobs:
40  ubuntu-22-hip-quality-check:
41    runs-on: ubuntu-22.04
42    container: rocm/dev-ubuntu-22.04:7.2.1
43    steps:
44      - name: Clone
45        id: checkout
46        uses: actions/checkout@v6
47
48      - name: Dependencies
49        id: depends
50        run: |
51          sudo apt-get update
52          sudo apt-get install -y build-essential git cmake rocblas-dev hipblas-dev libssl-dev python3 python3-venv python3-pip jq
53
54      - name: ccache
55        uses: ggml-org/ccache-action@v1.2.24
56        with:
57          key: hip-quality-check-ubuntu-22.04
58          save: false
59
60      - name: ccache-buckets-restore
61        uses: ./.github/actions/ccache-buckets
62        env:
63          HF_TOKEN: ${{ secrets.HF_TOKEN_CI }}
64        with:
65          key: hip-quality-check-ubuntu-22.04
66          folder: llama.cpp
67          hf_bucket: ggml-org/cache
68
69      - name: Build with Werror
70        id: cmake_build
71        run: |
72          cmake -B build -S . \
73            -DCMAKE_HIP_COMPILER="$(hipconfig -l)/clang" \
74            -DGPU_TARGETS=gfx942 \
75            -DGGML_HIP=ON \
76            -DGGML_HIP_EXPORT_METRICS=Off \
77            -DCMAKE_HIP_FLAGS="-Werror -Wno-tautological-compare" \
78            -DCMAKE_BUILD_TYPE=Release
79          cd build
80          make -j $(nproc)
81
82      - name: Check for major VGPR spills
83        id: vgpr_check
84        run: |
85          cmake -B build -S . \
86            -DCMAKE_HIP_COMPILER="$(hipconfig -l)/clang" \
87            -DGPU_TARGETS=gfx908 \
88            -DGGML_HIP=ON \
89            -DGGML_HIP_EXPORT_METRICS=On \
90            -DCMAKE_HIP_FLAGS="" \
91            -DCMAKE_BUILD_TYPE=Release
92          cd build
93          make -j $(nproc) 2>&1 | tee metrics.log | grep -v 'Rpass-analysis=kernel-resource-usage\|remark:\|^$'
94          python3 ../scripts/hip/gcn-cdna-vgpr-check.py metrics.log
95
96      - name: ccache-buckets-save
97        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
98        uses: ./.github/actions/ccache-buckets
99        env:
100          HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}
101        with:
102          key: hip-quality-check-ubuntu-22.04
103          folder: llama.cpp
104          evict-old-files: 1d
105          hf_bucket: ggml-org/cache
106          save: true