mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-05 15:58:53 +00:00
Made by tools/layout/move_0216.py (the commit before this one) on db8e0be9c, the final code head of 0.2.16:
- 75 git mv (renames, so `git log --follow` and blame keep working; packaging/acceptance_matrix.md shows as delete + add because its links
changed too) and 3 removals: SETUP.bat, UPDATE.bat and update.sh (setup.py --update pulls the code now);
- 1,425 path edits in 307 files: root-relative paths in CI, Docker, .gitignore and the release scripts; Markdown links; Python and
Node joins from a root that moved with its folder; explicit edits for code that computes a root or names a moved path; tables of
repository paths inside tests.
engine/ holds what CMake builds (src, include, cmake, metal, sycl, spark, third_party, the C++ tests and benches). app/ is the desktop
app and its host (was apps/). terminal/ is the Terminal in the layout of the installed one (strata.py, setup.py, strata_cli,
strata_control, serve, bin, data, ref, crates, the Python tools and tests). docs/ has the documentation, docs/lang/ the translated
READMEs, docs/history and docs/bench-results. tools/ has the repository's own checks, packaging, docker, research and nix.
tests/core/test_tqp_ref.py is a pytest file and stays with the Python tests (terminal/tests/core/).
AGENTS.md, README.md, LICENSE, setup.sh and START-HERE.bat stay at the root.
No behaviour change: the same command lines, the same sources. For this head a replay of the script gave the same numbers and the path
scan (tools/layout/checks/path_scan.py) reports no hit; the suites and the builds run on this commit next.
195 lines
8.6 KiB
YAML
195 lines
8.6 KiB
YAML
name: Backend compile checks
|
|
|
|
# Compile and link every engine backend with a pinned toolchain, without a GPU: nothing is run, so a call into a kernel that only
|
|
# exists for another backend (or an API a toolkit version dropped) fails here instead of on a user's machine. Hardware runs are separate.
|
|
# CUDA 12.9 and 13.0 nvidia/cuda devel container target strata (no MMQ, the default) (CMake preset cuda-compile)
|
|
# HIP (ROCm 7.2) rocm/dev container target strata (CMake preset hip-compile)
|
|
# SYCL (oneAPI 2026.1) ubuntu + Intel's apt repo target strata of engine/sycl/ (the commands of tools/packaging/build_sycl_linux.sh)
|
|
# Metal macOS runner target strata (engine/metal/; metal-build.yml keeps its own strata build)
|
|
# ggml comes from the vendored engine/third_party/strata-ggml (frozen at llama.cpp's pin), the same tree the release builds use: nothing is downloaded.
|
|
# Architectures are fewer than the release package's (compile time); the flags that decide which sources and defines are built are the release's.
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- .github/workflows/backends.yml
|
|
- engine/CMakeLists.txt
|
|
- engine/CMakePresets.json
|
|
- engine/cmake/**
|
|
- engine/src/**
|
|
- engine/include/**
|
|
- engine/third_party/**
|
|
- engine/sycl/**
|
|
- engine/metal/**
|
|
- terminal/setup.py
|
|
- tools/packaging/build_cuda_linux.sh
|
|
- tools/packaging/build_hip_linux.sh
|
|
- tools/packaging/build_sycl_linux.sh
|
|
pull_request:
|
|
paths:
|
|
- .github/workflows/backends.yml
|
|
- engine/CMakeLists.txt
|
|
- engine/CMakePresets.json
|
|
- engine/cmake/**
|
|
- engine/src/**
|
|
- engine/include/**
|
|
- engine/third_party/**
|
|
- engine/sycl/**
|
|
- engine/metal/**
|
|
- terminal/setup.py
|
|
- tools/packaging/build_cuda_linux.sh
|
|
- tools/packaging/build_hip_linux.sh
|
|
- tools/packaging/build_sycl_linux.sh
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: backends-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
|
CCACHE_MAXSIZE: 2G
|
|
|
|
jobs:
|
|
cuda:
|
|
name: CUDA ${{ matrix.cuda }}
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 120
|
|
container: nvidia/cuda:${{ matrix.image }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
# the cuda12 package is the one for Pascal and Volta: sm_60 needs STRATA_EXPERIMENTAL_SM60 (tools/packaging/build_cuda_linux.sh)
|
|
- { cuda: '12.9', image: '12.9.1-devel-ubuntu24.04', archs: '60-real;61-real;70-real;86-real', sm60: 'ON' }
|
|
- { cuda: '13.0', image: '13.0.2-devel-ubuntu24.04', archs: '75-real;86-real;120-real', sm60: 'OFF' }
|
|
steps:
|
|
- name: Tools
|
|
run: |
|
|
apt-get update
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git ca-certificates cmake ninja-build ccache
|
|
cmake --version | head -1
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: .ccache
|
|
key: ccache-cuda${{ matrix.cuda }}-${{ hashFiles('engine/CMakeLists.txt', 'engine/src/**', 'engine/include/**', 'engine/cmake/**') }}
|
|
restore-keys: ccache-cuda${{ matrix.cuda }}-
|
|
- name: Configure (preset cuda-compile)
|
|
run: |
|
|
nvcc --version | tail -2
|
|
cmake -S engine --preset cuda-compile -B build \
|
|
"-DCMAKE_CUDA_ARCHITECTURES=${{ matrix.archs }}" -DSTRATA_EXPERIMENTAL_SM60=${{ matrix.sm60 }} \
|
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache
|
|
- name: Build strata
|
|
run: cmake --build build --target strata -j "$(nproc)"
|
|
- name: Cache statistics
|
|
run: ccache -s | head -8
|
|
|
|
hip:
|
|
name: HIP ROCm 7.2
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 120
|
|
container: rocm/dev-ubuntu-24.04:7.2.4-complete
|
|
steps:
|
|
- name: Tools
|
|
run: |
|
|
apt-get update
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git ca-certificates cmake ninja-build ccache
|
|
cmake --version | head -1
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: .ccache
|
|
key: ccache-hip72-${{ hashFiles('engine/CMakeLists.txt', 'engine/src/**', 'engine/include/**', 'engine/cmake/**') }}
|
|
restore-keys: ccache-hip72-
|
|
- name: Configure (preset hip-compile)
|
|
run: |
|
|
/opt/rocm/llvm/bin/clang++ --version | head -1
|
|
cmake -S engine --preset hip-compile -B build \
|
|
-DCMAKE_HIP_COMPILER=/opt/rocm/llvm/bin/clang++ -DCMAKE_HIP_COMPILER_ROCM_ROOT=/opt/rocm -DCMAKE_PREFIX_PATH=/opt/rocm \
|
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_HIP_COMPILER_LAUNCHER=ccache
|
|
- name: Build strata
|
|
run: cmake --build build --target strata -j "$(nproc)"
|
|
- name: Cache statistics
|
|
run: ccache -s | head -8
|
|
|
|
sycl:
|
|
# The engine needs oneAPI 2026.1 or newer (engine/sycl/include/dpct/util.hpp uses the entangle and chunked_partition extensions, which the
|
|
# 2025.3.2 compiler does not have: it stops at "no member named 'entangle'"; the intel/oneapi-basekit images end at 2025.3), so the
|
|
# compiler comes from Intel's apt repository at a pinned version.
|
|
name: SYCL oneAPI 2026.1
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 120
|
|
container: ubuntu:24.04
|
|
steps:
|
|
- name: Tools and oneAPI 2026.1
|
|
run: |
|
|
apt-get update
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git ca-certificates cmake ninja-build ccache wget gpg
|
|
wget -qO- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor -o /usr/share/keyrings/oneapi-archive-keyring.gpg
|
|
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" > /etc/apt/sources.list.d/oneAPI.list
|
|
apt-get update
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
intel-oneapi-compiler-dpcpp-cpp-2026.1=2026.1.1-325 intel-oneapi-mkl-devel-2026.1=2026.1.0-236
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: .ccache
|
|
key: ccache-sycl-${{ hashFiles('engine/CMakeLists.txt', 'engine/src/**', 'engine/include/**', 'engine/sycl/**') }}
|
|
restore-keys: ccache-sycl-
|
|
- name: Configure and build (the commands of tools/packaging/build_sycl_linux.sh)
|
|
shell: bash
|
|
run: |
|
|
. /opt/intel/oneapi/setvars.sh --force >/dev/null
|
|
icpx --version | head -1
|
|
cmake -S engine/sycl -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx \
|
|
-DSTRATA_SYCL_PARITY=OFF -DSTRATA_SYCL_IQ_DECODE_FAST=ON \
|
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
|
cmake --build build --target strata -j "$(nproc)"
|
|
- name: Cache statistics
|
|
run: ccache -s | head -8
|
|
|
|
metal:
|
|
name: Metal strata
|
|
# the macOS 26 SDK: engine/metal/src/mtl_rt.mm names MTLGPUFamilyMetal4 behind @available (a run-time check); the names must be in the SDK
|
|
runs-on: macos-26
|
|
timeout-minutes: 60
|
|
env:
|
|
# engine/metal/setup_mac.py's metal-cpp pin (the same as metal-build.yml)
|
|
METAL_CPP_URL: https://developer.apple.com/metal/cpp/files/metal-cpp_26.zip
|
|
METAL_CPP_SHA256: 4df3c078b9aadcb516212e9cb03004cbc5ce9a3e9c068fa3144d021db585a3a4
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
- name: Tools
|
|
run: brew install ninja ccache
|
|
- name: metal-cpp
|
|
run: |
|
|
curl -fsSL "$METAL_CPP_URL" -o metal-cpp.zip
|
|
echo "$METAL_CPP_SHA256 metal-cpp.zip" | shasum -a 256 -c -
|
|
unzip -q metal-cpp.zip -d _mcpp
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: .ccache
|
|
key: ccache-metal-${{ hashFiles('engine/CMakeLists.txt', 'engine/src/**', 'engine/include/**', 'engine/metal/**') }}
|
|
restore-keys: ccache-metal-
|
|
- name: Configure
|
|
run: |
|
|
cmake -S engine/metal -B build-metal -G Ninja -DCMAKE_BUILD_TYPE=Release \
|
|
-DMETAL_CPP_DIR="$PWD/_mcpp/metal-cpp" \
|
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
|
- name: Build and link strata
|
|
run: cmake --build build-metal --target strata
|