KAR CUDA compile (GPU hidden) / kar-cuda-compile (pull_request) Failing after 52s
115 lines
4.8 KiB
YAML
115 lines
4.8 KiB
YAML
name: KAR CUDA compile (GPU hidden)
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'gpu/kar/**'
|
|
- 'engine/strata/CMakeLists.txt'
|
|
- 'engine/strata/include/strata/core/**'
|
|
- 'engine/strata/src/core/**'
|
|
- 'engine/strata/include/strata/prefill/**'
|
|
- 'engine/strata/src/prefill/**'
|
|
- 'engine/strata/src/program/generate.cpp'
|
|
- 'tests/kar-prefill-contract.cpp'
|
|
- 'scripts/test-kar-prefill-contract.sh'
|
|
- 'tests/kar-all-routed-contract.cpp'
|
|
- 'scripts/test-kar-all-routed-contract.sh'
|
|
- 'docs/upstream.md'
|
|
- 'gpu/kar/README.md'
|
|
- 'scripts/bootstrap-cuda-toolkit.py'
|
|
- 'scripts/build-static-cuda.sh'
|
|
- 'scripts/check-static-cuda-elf.py'
|
|
- 'scripts/test-kar-expert-cache.sh'
|
|
- 'scripts/test-kar-cuda-build-lock.py'
|
|
- 'deploy/cuda-toolkit.lock.json'
|
|
- 'deploy/kar-cuda-build.lock.json'
|
|
- '.gitea/workflows/kar-cuda-compile.yml'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
kar-cuda-compile:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 150
|
|
container:
|
|
image: ubuntu@sha256:f610ab94648195aa356059f5b41d6085c9d4d903c072430cdd1af7bdb646106b
|
|
env:
|
|
NVIDIA_VISIBLE_DEVICES: void
|
|
CUDA_VISIBLE_DEVICES: ''
|
|
steps:
|
|
- name: Install pinned Git for private checkout
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
apt-get update -qq
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
ca-certificates=20260601~24.04.1 \
|
|
git=1:2.43.0-1ubuntu7.3
|
|
|
|
- name: Checkout exact pull-request head
|
|
shell: bash
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
run: |
|
|
set -euo pipefail
|
|
: "${GITEA_TOKEN:?missing read-only GITEA_TOKEN}"
|
|
git init -q
|
|
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
|
|
GIT_CONFIG_COUNT=1 \
|
|
GIT_CONFIG_KEY_0=http.extraheader \
|
|
GIT_CONFIG_VALUE_0="Authorization: token ${GITEA_TOKEN}" \
|
|
git fetch --depth=1 origin "$GITHUB_REF"
|
|
git checkout --detach FETCH_HEAD
|
|
test "$(git rev-parse HEAD)" = "$GITHUB_SHA"
|
|
unset GITEA_TOKEN
|
|
|
|
- name: Compile CUDA component and native engine in pinned GPU-hidden container
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
test "$(dpkg --print-architecture)" = amd64
|
|
test "$(getconf GNU_LIBC_VERSION)" = 'glibc 2.39'
|
|
test "$NVIDIA_VISIBLE_DEVICES" = void
|
|
test -z "$CUDA_VISIBLE_DEVICES"
|
|
if compgen -G '/dev/nvidia*' >/dev/null; then
|
|
echo 'unexpected NVIDIA device mounted in CUDA compile job' >&2
|
|
exit 1
|
|
fi
|
|
apt-get update -qq
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
ca-certificates=20260601~24.04.1 \
|
|
cmake=3.28.3-1build7 \
|
|
gcc-13=13.3.0-6ubuntu2~24.04.1 \
|
|
g++-13=13.3.0-6ubuntu2~24.04.1 \
|
|
make=4.3-4.1build2 \
|
|
python3=3.12.3-0ubuntu2.1
|
|
dpkg-query -W -f='${Package}=${Version}\n' ca-certificates cmake gcc-13 g++-13 git make python3
|
|
python3 scripts/test-kar-cuda-build-lock.py
|
|
CXX=g++-13 scripts/test-kar-expert-cache.sh
|
|
CXX=g++-13 scripts/test-kar-prefill-contract.sh
|
|
CXX=g++-13 scripts/test-kar-all-routed-contract.sh
|
|
python3 scripts/bootstrap-cuda-toolkit.py --output /tmp/cuda-toolkit
|
|
export CUDACXX=/tmp/cuda-toolkit/bin/nvcc
|
|
export CUDAToolkit_ROOT=/tmp/cuda-toolkit
|
|
export CC=gcc-13 CXX=g++-13
|
|
cmake -S gpu/kar -B /tmp/kar-build -DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_CUDA_HOST_COMPILER=/usr/bin/g++-13 \
|
|
-DCMAKE_CUDA_ARCHITECTURES=120
|
|
cmake --build /tmp/kar-build --parallel 1 --target strata-kar-expert-cache-test strata-kar-expert-test strata-kar-expert-miss-test strata-kar-expert-probe
|
|
ctest --test-dir /tmp/kar-build --output-on-failure -R "^kar_expert_cache_index$"
|
|
|
|
# Compile the actual native engine, including generate and Prefill:
|
|
# the standalone KAR component cannot cover their callback integration.
|
|
cmake -S engine/strata -B /tmp/kar-engine-build \
|
|
-DSTRATA_ENABLE_CUDA=ON -DSTRATA_ENABLE_HIP=OFF \
|
|
-DSTRATA_CUDA_STATIC=ON -DSTRATA_NATIVE_EXPERTS=ON \
|
|
-DSTRATA_PORTABLE=ON -DSTRATA_BUILD_TESTS=OFF \
|
|
-DSTRATA_NEXT_EXPERIMENTAL_KAR_EXPERTS=ON \
|
|
-DSTRATA_NEXT_KAR_DIR="$PWD/gpu/kar" \
|
|
-DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_ARCHITECTURES=120 \
|
|
-DCMAKE_CUDA_HOST_COMPILER=/usr/bin/g++-13
|
|
cmake --build /tmp/kar-engine-build --parallel 1 --target strata
|
|
python3 scripts/check-static-cuda-elf.py /tmp/kar-engine-build/strata
|
|
env -u LD_LIBRARY_PATH /tmp/kar-engine-build/strata --help
|