Repository navigation
Conversation
This was referenced Nov 27, 2026
Omarchy has no OpenCL driver on Apple Silicon. Build Rusticl for asahi in a meson build of its own, so SPIRV-Tools stays out of libgallium and libvulkan_asahi, and package it as opencl-aurora.
The recipe tests pinned the old rule that no mesa-aurora package links SPIRV-Tools. Keep it for mesa-aurora and vulkan-aurora, and cover the new Rusticl guard in check().
libRusticlOpenCL links both by soname, and neither follows llvm-libs on its own schedule, so name them as rebuild triggers at the versions this build used. The libgallium cases of the check() test now fail if the Rusticl guard is what refused them. Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
maralcbr
force-pushed
the
mac/opencl-aurora
branch
from
November 28, 2026 01:08
f66b386 to
8d018ae
Compare
Carries agx-keep-weak-ffma on omacom/mesa: since fe376944ae1 every OpenCL mad() took the FP32 FMA repair, so fp32 compute ran about 10x slower on M1 and M2. Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Omarchy has no OpenCL on Apple Silicon: mesa-aurora builds no Rusticl and nothing ships an ICD, so
clGetPlatformIDsreturns -1001. This addsopencl-aurora, a split package of mesa-aurora with Rusticl for the asahi Gallium driver. The Mac Lab needs it for its clpeak rows. Arch'sopencl-mesais a different Mesa, so it is not an option.What changes
-Dgallium-rusticl=trueforces CLC on, and CLC forces SPIRV-Tools on (-Dspirv-tools=disabledis an error). With SPIRV-Tools found, libvtn links it, and libgallium and libvulkan_asahi link libvtn. libRusticlOpenCL links its Gallium driver statically, not through libgallium, so a build of its own keeps SPIRV-Tools, which Arch Linux ARM moves without a versioned soname, out of the GL and Vulkan drivers. mesa-aurora and vulkan-aurora come from the same build as before.-Dstatic-libclc=all: libclc's SPIR-V is linked in, so there is no run-time libclc depend.opencl-aurorashipslibRusticlOpenCL.so*and/etc/OpenCL/vendors/rusticl.icd. It depends onmesa-aurora=$epoch:$pkgver-$pkgrel,clang(libclang-cpp; stable's ALARM has noclang-libs),spirv-llvm-translator,spirv-tools,libLLVM.so(makepkg versions it:libLLVM.so=23.1-64),opencl-icd-loaderand the libraries it links. It providesopencl-driverand conflicts withopencl-mesa. Nothing installs it: it is not in any meta package's depends.groups=('omarchy-platform-apple-silicon'). That group is the Apple platform tag for the pacman platform guard, which optional Apple-only packages such as widevine and fex-emu also carry; it is not an install-all group.check()keeps every old guard on the main build and adds one for Rusticl: the ICD file exists; libRusticlOpenCL is executable (so makepkg versions itslibLLVM.sodepend), links the samelibLLVM.so.<major>.<minor>as libgallium (one LLVM per process), and does not link libgallium. SPIRV-Tools is allowed there and only there.tests/aurora-edge: the recipe tests pinned "no mesa-aurora package links SPIRV-Tools". They keep it for mesa-aurora and vulkan-aurora, check opencl-aurora's depends, provides and conflicts, and cover the new guard (another LLVM, no LLVM, linking libgallium, not executable, no ICD file). Each libgallium case must fail on the libgallium guard, not on the later Rusticl one. This file outsidepkgbuilds/also keeps the PR from merging itself.rebuild_ongainsspirv-toolsandspirv-llvm-translator, since only opencl-aurora links them and Arch Linux ARM moves SPIRV-Tools without a soname bump.rebuilt_againstrecords the versions this build used (from the CI log).26.3.0_devel.20261128.234136.9b08a21bf0f,pkgrel1), which adds one carry, below.release/owners.jsonfrombin/release-owners mesa-auroraon Arch: only the mesa-aurora line, addingopencl-auroraandopencl-driver. Every rule holds, noapprovedline.FP32 compute: the agx-keep-weak-ffma carry
On 7.3 the first push's packages ran OpenCL fp32 about 10× slower than at e705eca (M2 Max 9–10.5 → 1.0–0.31 TFLOPS, M1 Pro 4.6–5.2 → 0.53–0.09); fp16 and bandwidth were unchanged. The cause is aurora-silicon fe376944ae1 (aurora-silicon/mesa#930), which turned the FP32 FMA tininess repair (
agx_nir_lower_fma_rte) on for every chip. Rusticl runsnir_opt_algebraicbeforeagx_shader_initialize(), and that pass turns OpenCLmad()(ffma_weak) into a strictffma, so everymad()took the repair: a branch and about 160 instructions of 64-bit integer code each. clpeak's fp32 kernels grew from about 1.5k to 327k instructions. GL is not affected (no RTE float controls), and Borealis runs the repair before any algebraic pass.aurora-7.3.0-3 carries our
asahi/compiler: keep OpenCL mad() out of the FP32 FMA repairas anoursentry in carry.toml:A new
NativeFMA.MadSurvivesFrontendAlgebraictest replays Rusticl's order. It is not upstream yet; the entry'supstreamfield says so.RUSTICL_ENABLE
Mesa's loader passes the kernel's DRM driver name through unchanged: linux-aurora 7.3 calls it
aurora, 7.2asahi. Rusticl's allowlist (gallium-rusticl-enable-drivers=auto) names onlyasahi, so at the old pin the GPU was missing on 7.3. aurora-silicon/mesa#906, now in the pin, maps each name to the other inget_enabled_devs. The Apple GPU then shows with noRUSTICL_ENABLEon either kernel, andRUSTICL_ENABLE=asahi(what the lab sets) or=auroraboth select it. Noenvironment.dfile is packaged.Proof
7.3, with the carry
m1-pro (M1 Pro, G13S C0, 16 cores, 1296 MHz), kernel 7.3.0-0testedgeC, AC. A local
bin/buildof this recipe from a single-commit copy of the aurora-7.3.0-3 tree (same tree hash,657f13e1e80b, sogit-e5dba70bb7in the driver string);check()277/277 meson tests. Same unpack-and-overlay method as below, nothing installed, host checked clean after. clpeak--single-precision-compute, runs interleaved in one boot:The carry removes all of the repair's cost: it matches a build with the repair off. fp16 (4.6–5.2 TFLOPS) and bandwidth (147–177 GB/s) match across e705eca, aurora-7.3.0-2 and this pin.
clinfo -lfinds the GPU withRUSTICL_ENABLEunset. The float8/float16 gap to e705eca is a separate upstream change between the two Mesa bases (same instruction counts, more registers in some kernels), not FMA-related; it is a follow-up, not this PR. PR CI for this push: build (mesa-aurora, aarch64) passes, packages in its artifacts.First push
check()green, all three packages made. self-tests pass.opencl-aurora(7.7 MB, sha256ca5ca113…4d644585),mesa-aurora(7.5 MB,7fade14d…a06ef2),vulkan-aurora(5.1 MB).gh run download 45981742559 -R omacom/omarchy-pkgs -p 'opencl-aurora-*' -p 'mesa-aurora-1*'.mesa-aurorahas no Rusticl or OpenCL file and no library in it links SPIRV-Tools. libRusticlOpenCL NEEDED: libLLVM.so.23.1, libclang-cpp.so.23.1, libLLVMSPIRVLib.so.23.1, libSPIRV-Tools{,-opt,-link}.so, libdrm, libexpat, libz, libzstd, libstdc++, libgcc_s, libm, libc, each covered by a depend. makepkg wrotelibLLVM.so=23.1-64./tmp; run inunshare -mwith read-only overlays over/usrand/etc;/tmpcleared after. The host still has no/etc/OpenCLand no libRusticlOpenCL.clinfo -l, no env:Platform #0: rusticl,Device #0: Apple M2 Max (G14C B1). Same withRUSTICL_ENABLE=asahi: OpenCL 3.1, OpenCL C 1.2, 30 compute units, 1398 MHz, driver26.3.0-devel (git-e705eca833). Not llvmpipe.RUSTICL_ENABLE=asahi clpeak --opencl --global-memory-bandwidth --single-precision-compute: fp32 9.22 / 9.72 / 10.5 / 10.5 / 10.5 TFLOPS (float to float16); global memory bandwidth 323 / 346 / 339 / 342 / 348 GB/s.Rusticl prints
Patched Mesa libclc not detectedon start: it is built against Arch's upstream libclc, as Arch's opencl-mesa is. Kernels ran correctly in clpeak; a patched libclc is a later change if it matters.