ci: run lavapipe at the AVX level on every Linux runner #477
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/477"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-03T19:32:22Z.
What
agc_driver_vopc_comparefails on some Linux CI runs withthread 1 compare 39 is 0, expected 1. It is not flaky: it depends on which CPU the runner has, and the bug is in the LLVM that Ubuntu 24.04's lavapipe uses, not in the recompiler. #399 changed howv_cmp_nle_f16is lowered to fix it; LLVM receives the same compare either way, so that change neither caused nor fixed the failure.This sets
GALLIUM_OVERRIDE_CPU_CAPS=avxfor the Linuxcteststep, so lavapipe compiles at the same level on every runner and LLVM never emits AVX512-FP16 code.The runner's CPU decides it. On 14 fork CI runners I ran the test 15 times per setting (6 runners), then 3 times per setting (8 runners). Every runner gave the same result on every run:
GALLIUM_OVERRIDE_CPU_CAPS=avx/proc/cpuinfo, but LLVM picks the target from the CPU model)On a failing runner,
GALLIVM_PERF=nopt(no LLVM optimization) also passes.LP_NATIVE_VECTOR_WIDTH=128still fails.Where it goes wrong. With every compare reported (not just the first), the wrong results on those runners are compares 39 (
v_cmp_nle_f16), 40 (v_cmp_nlt_f16) and 48 (v_cmpx_nle_f16), in both directions. Each returns its mirror's result: NLE gives NGE's, NLT gives NGT's.OpFUnordLessThan a b, NLE isOpFUnordLessThan b a.-sprfails;-icxand-hswpass;-spr.-spr. The optimized IR is still correct:fcmp ult <8 x half> %b, %afor NLE next tofcmp ult <8 x half> %a, %bfor NGE, and the same for theugepair. LLVM then targetssapphirerapids, which implies AVX512-FP16.llc -O2 -mcpu=sapphirerapids:LLVM 20.1.2 emits a single masked
vcmpnlephfor both compares, so the second one gets the first one's result. LLVM 22.1.8 emits two with swapped operands. With augepair added, LLVM 20 emits 2 compares for 4 and LLVM 22 emits 4.GALLIUM_OVERRIDE_CPU_CAPS=avxmakes Mesa pass-avx512fand the other AVX-512 features to LLVM, which disables AVX512-FP16 too. The halves are then compared as floats, which is correct. It applies on every runner, so the Vulkan tests compile the same way whatever CPU the job lands on. Nothing in the recompiler or the tests changes.Tested
cteststep took 27.3 s, against 23.8 s for another branch on the same day, so the AVX level costs little.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)