okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

waveringanaserve: restore the DeepSeek V4.1 server paths, tools and headers removed upstream, keeping the native picture tower firstba8745e13

main
1.7 KiB28 linesraw
1#!/bin/bash
2# strata-dsv41 + the kernel parity tests for AMD (HIP) on Linux.  Default arch gfx1151 (Strix Halo, RDNA3.5); gfx1201 (R9700) works the same.
3# Built and ready, NOT run on a Linux Strix box (there is none); the Windows build of the same sources is the tested one.
4#
5#   ROCM_ROOT=/opt/rocm   (or the TheRock wheel root, e.g. .../_rocm_sdk_devel)  tools/dsv41/build_hip_linux.sh [targets...]
6#   env: STRATA_HIP_ARCHS (default gfx1151), BUILD_DIR (default build-dsv41-hip), JOBS (default nproc), STRATA_GGML_DIR (llama.cpp checkout)
7# Needs: cmake, ninja, a ROCm with clang++ (ROCm >= 6.4 knows gfx1151; the wheel's device package is _rocm_sdk_libraries_gfx115X_all
8# or gfx1151), and glibc matching the box.  The engine has no RPATH: run with the ROCm lib dir on LD_LIBRARY_PATH.
9set -e
10SRC="$(cd "$(dirname "$0")/../.." && pwd)"
11ARCH="${STRATA_HIP_ARCHS:-gfx1151}"
12R="${ROCM_ROOT:-/opt/rocm}"
13B="${BUILD_DIR:-$SRC/build-dsv41-hip}"
14J="${JOBS:-$(nproc)}"
15CLANG="$R/llvm/bin/clang++"; [ -x "$CLANG" ] || CLANG="$R/lib/llvm/bin/clang++"
16GGML=""; [ -n "$STRATA_GGML_DIR" ] && GGML="-DSTRATA_GGML_DIR=$STRATA_GGML_DIR"
17BC="$R/amdgcn/bitcode"; [ -d "$BC" ] || BC="$R/lib/llvm/amdgcn/bitcode"; [ -d "$BC" ] || BC="$R/llvm/amdgcn/bitcode"
18export PATH="$R/bin:$PATH"
19if [ ! -f "$B/build.ninja" ]; then
20  cmake -S "$SRC" -B "$B" -G Ninja -DCMAKE_BUILD_TYPE=Release \
21    -DSTRATA_ENABLE_HIP=ON -DCMAKE_HIP_ARCHITECTURES="$ARCH" -DSTRATA_BUILD_TESTS=OFF -DSTRATA_BUILD_DSV41=ON \
22    -DSTRATA_NATIVE_EXPERTS=ON $GGML \
23    -DCMAKE_HIP_COMPILER="$CLANG" -DCMAKE_HIP_COMPILER_ROCM_ROOT="$R" \
24    "-DCMAKE_HIP_FLAGS=--rocm-path=$R --rocm-device-lib-path=$BC" \
25    "-DCMAKE_PREFIX_PATH=$R"
26fi
27cmake --build "$B" -j "$J" --target ${@:-strata-dsv41 ds4_iq_test} -- -k 0
28echo "built in $B"