3 Commits
Author SHA1 Message Date
geramyloveless cdb75b6ff4 Pin llama.cpp b11379 and build its Vulkan backend for RADV
llama.cpp is the first application of the Vulkan path. third_party/llama.cpp
pins b11379 as an optional, unpatched upstream (sparse, update = none);
scripts/bootstrap.sh --llama-only fetches it and verify-upstream.py checks
it once checked out.

scripts/build-llama-vulkan.sh (make llama-vulkan) builds it with
GGML_VULKAN against the Vulkan loader (Homebrew's or the LunarG SDK's),
Metal, BLAS and libcurl off, into build/llama.cpp/bin: llama-bench,
llama-completion and test-backend-ops. Its shaders need shaderc's glslc.
scripts/llama-radv.sh runs any program with the loader pointed at the RADV
ICD alone, so a MoltenVK installation is not used.

test-llama-offline brings the CS fixture device up inside llama.cpp's own
test-backend-ops (vulkan/tests/fixture_preload.c, inserted through
MLG_PRELOAD) so its Vulkan backend runs on RADV on the software GPU:
llama.cpp lists the R9700, and in performance mode ADD and the Q4_0/Q4_K
matrix multiplications of a feed-forward layer (matrix-vector and
matrix-matrix pipelines) are compiled by ACO, allocated, submitted and
fenced. It skips unless RADV and llama.cpp are built.
2026-10-03 11:19:41 -07:00
geramyloveless a64270efa5 Pin Mesa 26.2.4 for RADV, with two declared patches
third_party/mesa is Mesa at mesa-26.2.4, the latest stable release,
declared in patches/manifest.json as an optional upstream: a shallow,
partial, sparse submodule of what a RADV-only Meson build reads (about
60 MB), marked update = none so a recursive clone does not fetch it. Only
the Vulkan build needs it; scripts/bootstrap.sh --with-mesa fetches it
with the rest, --mesa-only alone, and once checked out it is kept at the
pin and patched like the Linux tree.

The patch set, 88 lines added and 9 removed in 8 files:

- radv-macos-build.patch: find libdrm through pkg-config on Darwin when
  RADV is built, select addrlib's portable type definitions instead of
  the Apple kernel driver's private header, and link RADV with
  -undefined dynamic_lookup as KosmicKrisp does.
- drm-file-ops.patch: util/os_drm.h issues requests through drmIoctl and
  wraps open, stat, mmap and munmap of DRM nodes and files in libdrm's
  drmFile* functions when libdrm defines LIBDRM_FILE_OPS; RADV's six call
  sites use the wrappers. Nothing changes for a kernel libdrm.

bootstrap.sh sets up any manifest upstream the same way now (pin fetched
by SHA, sparse before the first checkout, declared patches applied).
verify-upstream.py checks Mesa's pin, sparse set, patches and working tree
once it is checked out, and takes --only linux|mesa; lib-dext verifies the
Linux tree alone (make verify-linux), so local Mesa work cannot block a
driver build, while make verify-source checks every tree.
2026-10-03 11:19:19 -07:00
geramyloveless 953cf0149c mac_linuxgpu: upstream Linux amdgpu on macOS
Runs the unmodified upstream Linux amdgpu and amdkfd drivers on Apple
Silicon Macs inside a DriverKit system extension, for AMD GPUs attached
over Thunderbolt. The Linux sources come from a pinned submodule and are
compiled against linuxu, a userspace implementation of the Linux kernel
APIs they use. Includes the HSA runtime, the host installer app, the
setup and firmware fetch scripts, and the offline test suite.
2026-10-02 18:49:17 -07:00