Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions docs/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,36 @@ python3 -I tests/test_<name>.py # one standard-

[testing.md](testing.md) covers the GPU tests (`scripts/run_gpu_tests.py`), running them on llvmpipe, and choosing
the GPU.

### Without root (micromamba)

If you cannot install distribution packages (no `sudo`), you can install `llvm-tools` and `spirv-tools` into a
user-owned folder with [micromamba](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html)
(x86-64 glibc; for ARM64 use `linux-aarch64` from the micromamba guide; musl/Alpine is not natively supported) and let
CMake fetch its pinned, hash-checked Vulkan headers if the system does not provide them:

```bash
LEO=$HOME/leonida-tools
mkdir -p "$LEO/bin" "$LEO/mamba"
# Note: `latest` is unpinned and downloaded without signature verification; inspect or pin per the micromamba guide.
curl -fsSLo "$LEO/micromamba.tar.bz2" https://micro.mamba.pm/api/micromamba/linux-64/latest
tar -xjf "$LEO/micromamba.tar.bz2" -C "$LEO/bin" --strip-components=1 bin/micromamba

export MAMBA_ROOT_PREFIX="$LEO/mamba"
"$LEO/bin/micromamba" create -y -n leonida -c conda-forge --override-channels "llvm-tools>=21" spirv-tools
export PATH="$LEO/mamba/envs/leonida/bin:$PATH"

cmake -S runtime -B runtime/build/linux -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_VULKAN_HEADERS_FETCH=ON
cmake --build runtime/build/linux --parallel "$(nproc)"
LLVM_MC=llvm-mc LEONIDA_VK_DEVICE="<part of your GPU name>" \
python3 -I scripts/run_gpu_tests.py --build runtime/build/linux --work "$LEO/run" --require-pass | tee "$LEO/run.log"
echo "runner exit: ${PIPESTATUS[0]}"
```

Notes:
- `LEONIDA_VK_DEVICE` selects the physical GPU by substring so the runner does not fall back to Mesa's `llvmpipe`.
- Keep `$LEO` on a filesystem without `noexec` (`findmnt -no OPTIONS "$LEO"`).
- System prerequisites still needed: a working Vulkan driver/loader (`vulkaninfo --summary`), `cmake`, `ninja`, `g++`
(or `clang++`), `python3`, `curl`, `tar`, and `bzip2`.
- Cleanup: delete `$LEO` and `runtime/build/linux`. micromamba also writes `~/.conda/environments.txt` and
`~/.mamba/pkgs/urls.txt` (delete only those files if you already use conda).
1 change: 1 addition & 0 deletions tests/test_docs_cli_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
# Flags of other programs the docs quote: gh (AGENTS.md), pip (docs/shader_validation.md), argparse itself, and
# the spirv-opt passes docs/embedded_shaders.md tried on one module.
FOREIGN = {"--search", "--state", "--index-url", "--help",
"--strip-components", "--override-channels",
"--ssa-rewrite", "--eliminate-dead-code-aggressive", "--eliminate-dead-branches", "--merge-blocks",
"--cfg-cleanup", "--merge-return", "--scalar-replacement"}
# Pages that quote another project's tree (SCARAB, americas-recomp).
Expand Down