diff --git a/packaging/ENGINE-COMPONENT.md b/packaging/ENGINE-COMPONENT.md index fd8b6134ab..2da51611d1 100644 --- a/packaging/ENGINE-COMPONENT.md +++ b/packaging/ENGINE-COMPONENT.md @@ -108,7 +108,7 @@ the SYCL and Metal packages, and (0.2.7.1) Linux ARM64 `cuda13` for the NVIDIA D | `windows-x86_64` hip | the owner PC, `tools/hip/build_windows.bat` (ROCm 10.2 nightly wheels) then `tools/hip/package_windows.py` | `strata.exe`, `strata-device.exe`, the ROCm DLLs and the rocBLAS/hipBLASLt kernels of the zip (`--tree`) | with `STRATA_NO_VISION` unset it also builds the two picture readers (`strata-vision.exe` on the CPU, `strata-vision-hip.exe` on the GPU) | | `linux-x86_64` cuda, variant `cuda13` | a Linux box with the CUDA 13 toolkit, `VARIANT=cuda13 packaging/build_cuda_linux.sh` | `strata`, `libstrata_kq.so`, `strata-vision` (built by the same script for the same archs, `BUILD_VISION=0` for a text-only package), `libcudart/libcublas/libcublasLt` (13.x) | the GPU driver's `libcuda` stays the PC's | | `linux-x86_64` cuda, variant `cuda12` | a Linux box with CUDA 12.9, `VARIANT=cuda12 packaging/build_cuda_linux.sh` (`60;61;70;75;80;86;89` real + `89` PTX, `STRATA_EXPERIMENTAL_SM60=ON`) | the same files with the 12.x libraries (the reader has sm_60 / 61 / 70 too) | experimental, `min_driver` nvidia 575.51; the Pascal and Volta package; `package_engine.py` refuses a cuda12 package without them | -| `linux-aarch64` cuda, variant `cuda13` (NVIDIA DGX Spark, GB10, `sm_121` + `compute_121`) | the Spark itself (Ubuntu 24.04, CUDA 13.0; glibc 2.39), `COMMIT= packaging/build_cuda_linux_aarch64.sh` (runs `spark/build_engine.sh`: `STRATA_PORTABLE=ON`, ggml-cpu `armv8.2-a+dotprod+fp16+i8mm`, RUNPATH `$ORIGIN`) | `strata`, `libstrata_kq.so`, `strata-vision`, cuBLAS / cuBLASLt / cudart. Driver 580.65 or newer | built and tested on one DGX Spark only; no other arm64 box has been tried. No HIP, SYCL or CPU engine and no desktop app for arm64 Linux | +| `linux-aarch64` cuda, variant `cuda13` (NVIDIA DGX Spark, GB10, `sm_121` + `compute_121`) | the Spark itself (Ubuntu 24.04, CUDA 13.0; glibc 2.39), `COMMIT= packaging/build_cuda_linux_aarch64.sh` (runs `spark/build_engine.sh`: `STRATA_PORTABLE=ON`, ggml-cpu `armv8.2-a+dotprod+fp16+i8mm`, RUNPATH `$ORIGIN`) | `strata`, `strata-vision`, cuBLAS / cuBLASLt / cudart (built without llama.cpp's MMQ since 0.2.15, so no `libstrata_kq.so`). Driver 580.65 or newer | built and tested on one DGX Spark only; no other arm64 box has been tried. No HIP, SYCL or CPU engine and no desktop app for arm64 Linux | | `linux-x86_64` hip | a box with ROCm (the Python wheels are enough) | `strata`, the HIP runtime, hipBLAS/hipBLASLt/rocBLAS, comgr + libLLVM, `rocblas/library` and `hipblaslt/library` for the listed gfx archs; `packaging/build_hip_linux.sh` builds it with both picture readers | | `linux-x86_64` hip, variant `rx6000` (RX 6000, gfx1030 / gfx1031) | `VARIANT=rx6000 packaging/build_hip_linux.sh` in the jammy chroot, ROCm 7.13.0a20260515 `gfx103X-all` wheels | the same set as the other HIP packages, with `rocblas/library` for gfx1030 / gfx1031; no `hipblaslt/library` kernels exist for them and no `tuning/` table | built, not tested on a real RX 6000 card (the manifest notes say so). `windows-x86_64` hip, variant `rdna2`: the same archs from `tools/hip/build_windows.bat` with `STRATA_HIP_ARCHS=gfx1030;gfx1031`, packaged with `--variant rdna2`. A PC with an RX 7000 / 9000 card beside an RX 6000 one never takes it (`engine_component.hip_preference`) | | `linux-x86_64` hip, gfx1103 (Radeon 780M / Phoenix iGPU) | `packaging/build_hip_gfx1103.sh` on the mini PC (TheRock gfx110X-all SDK) | the same set as the gfx1200/1201 package, with `rocblas/library` and `hipblaslt/library` for gfx1103 (600 MiB) | experimental, unvalidated: the iGPU resets now and then (MES REMOVE_QUEUE); never kill the engine mid-request; run configs set `STRATA_NO_ARENA_THP=1`. `engine_component.resolve` picks a HIP package only when its `archs` list a gfx target the Linux kfd topology reports | diff --git a/packaging/build_cuda_linux_aarch64.sh b/packaging/build_cuda_linux_aarch64.sh index 7630e3875f..f870ed1917 100644 --- a/packaging/build_cuda_linux_aarch64.sh +++ b/packaging/build_cuda_linux_aarch64.sh @@ -6,7 +6,7 @@ # # Run it on the Spark (arm64 Linux, CUDA 13.0 toolkit, a Python 3 venv with requirements.txt and requirements-build.txt, cmake and # ninja on PATH; PYTHON=). It runs spark/build_engine.sh, then makes the package in $OUT (default ./out-engine-cuda13-aarch64): -# -linux-aarch64-cuda-cuda13/ strata, libstrata_kq.so, strata-vision and the CUDA libraries (feed member "engine") +# -linux-aarch64-cuda-cuda13/ strata, strata-vision and the CUDA libraries (feed member "engine"; libstrata_kq.so only from an A/B build with -DSTRATA_MMQ=ON) # Nothing is signed or uploaded: sign with packaging/feed_tool.py (sign-package, then pack-engine). # # PKGVER is the package version (default: the version in CMakeLists.txt); COMMIT names the source commit in the build id and is required diff --git a/setup.py b/setup.py index 1dec84fe78..16e0935922 100644 --- a/setup.py +++ b/setup.py @@ -6357,9 +6357,9 @@ def build_engine(gpu, vision, yes, llama, toolkit=None) -> Path: if local and (eng / EXE).exists() else " Compiling the Strata engine for your GPU (10-20 minutes, once) ...") cmake_build(ROOT, bdir, "strata", ["-DSTRATA_ENABLE_CUDA=ON", "-DSTRATA_BUILD_TESTS=OFF", "-DSTRATA_Q6K_EXPERTS=ON", "-DSTRATA_MMQ_KQUANTS=ON", - # without llama.cpp's MMQ, also in a build folder configured before (its cache says ON); ARM64 (DGX Spark): - # not measured without MMQ, kept as in 0.2.13 - "-DSTRATA_MMQ=" + ("ON" if is_arm64() else "OFF"), + # without llama.cpp's MMQ, also in a build folder configured before (its cache says ON); ARM64 (DGX Spark) + # too since 0.2.15 (spark/build_engine.sh: the fused prompt kernels take every layer they cover there) + "-DSTRATA_MMQ=OFF", f"-DCMAKE_CUDA_ARCHITECTURES={cuda_archs}", f"-DCMAKE_CUDA_COMPILER={nvcc}", *toolkit_root_defs(nvcc), *ggml_defs(llama), *host_compiler_defs(True), *engine_defs(archs, toolkit), diff --git a/spark/build_engine.sh b/spark/build_engine.sh index 4123b94dd2..7552ccb690 100755 --- a/spark/build_engine.sh +++ b/spark/build_engine.sh @@ -51,9 +51,12 @@ cd "$repo" "$cmake" -G Ninja -S . -B "$build" -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON -DSTRATA_BUILD_TESTS=OFF \ -DSTRATA_NATIVE_EXPERTS=ON -DSTRATA_PORTABLE=ON -DSTRATA_Q6K_EXPERTS=ON -DSTRATA_MMQ_KQUANTS=ON \ -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_SKIP_BUILD_RPATH=OFF '-DCMAKE_INSTALL_RPATH=$ORIGIN' \ - -DSTRATA_MMQ=ON "-DCMAKE_CUDA_ARCHITECTURES=${real};${last}-virtual" $ggml ${STRATA_CMAKE_EXTRA:-} $shape_cmake -# -DSTRATA_MMQ=ON: not measured without MMQ; kept as in 0.2.13 (the engine default is OFF since then) -# strata_kq (libstrata_kq.so) exists only in a build with llama.cpp's MMQ: STRATA_CMAKE_EXTRA=-DSTRATA_MMQ=OFF builds without it + -DSTRATA_MMQ=OFF "-DCMAKE_CUDA_ARCHITECTURES=${real};${last}-virtual" $ggml ${STRATA_CMAKE_EXTRA:-} $shape_cmake +# without llama.cpp's MMQ, as the x86 release builds since 0.2.14 (named here: a build folder configured before keeps ON in its cache). +# Such a build turns Strata's fused prompt kernels on for every layer they cover (src/prefill/prefill.cpp, own_only_switches.hpp), on the +# GB10 too: IQ3_S, UD-IQ4_XS and UD-Q4_K_XL ran 48 of 48 layers on them on a GB10 (par/RESULTS-SPARK-R1.md, 11-14 / 11-15), the rest +# takes the FP16 path. strata_kq (libstrata_kq.so) exists only in a build with MMQ: STRATA_CMAKE_EXTRA=-DSTRATA_MMQ=ON builds the old +# path (A/B runs) . "$repo/packaging/engine_targets.sh" targets=$(engine_targets "$cmake" "$build") # shellcheck disable=SC2086 diff --git a/tests/terminal/test_linux_aarch64.py b/tests/terminal/test_linux_aarch64.py index 634e971675..41263f5925 100644 --- a/tests/terminal/test_linux_aarch64.py +++ b/tests/terminal/test_linux_aarch64.py @@ -114,6 +114,15 @@ class ReleaseTools(unittest.TestCase): self.assertIn(b'linux-aarch64', raw) self.assertIn(b"-DSTRATA_PORTABLE=ON", raw) + def test_the_spark_engine_is_built_without_mmq(self): + # 0.2.15: the Spark's engine has no llama.cpp MMQ, as the x86 release builds (the release script and setup's own build) + raw = (ROOT / "spark" / "build_engine.sh").read_bytes() + self.assertIn(b"-DSTRATA_MMQ=OFF", raw) + self.assertNotIn(b" -DSTRATA_MMQ=ON", raw) + setup_text = (ROOT / "setup.py").read_text(encoding="utf-8") + self.assertIn('"-DSTRATA_MMQ=OFF",', setup_text) + self.assertNotIn('("ON" if is_arm64() else "OFF")', setup_text) + class GB10Probes(unittest.TestCase): """nvidia-smi gives a GB10's memory.total as [N/A]: the probes the Terminal reads must neither drop the card nor invent a size."""