fix(QUANT-GGUF-CPU-THREADPOOL): floor the oversubscription threshold at 100 us so 4-vCPU CI does not flake - #3140
Open
localai-org-maint-bot wants to merge 1 commit into
Open
localai-org-maint-bot wants to merge 1 commit into
localai-org-maint-bot wants to merge 1 commit into
Conversation
…at 100 us so 4-vCPU CI does not flake The ratio-based assertion ratio < 100.0 is calibrated on a 20-core box where the fits arm measures ~1.7 us and the defect produces 3-6 ms. On a 4-vCPU GitHub runner the arms are 2 and 5 threads, the fits arm can measure 0.4 us, and normal scheduler jitter in the over arm (42 us) trips the ratio at 101.5 against the 100.0 threshold. Floor the right-hand side at 100.0 us: over_us < max(100.0 * fits_us, 100.0). The defect this test guards produces a full scheduler timeslice (2999-5996 us), so the 100 us floor sits ~30x below the defect floor and does not mask it. Closes #3130 FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:GLM5.2 [MAKI]
This was referenced Sep 11, 2026
Merged
Closed
Merged
localai-org-maint-bot
added a commit
that referenced
this pull request
Sep 12, 2026
…h the ViewOn contract (#3154) test_rocm_f16_contract (introduced in #3095) failed on clean main because its check lambda expected `OwnedTensor::View()` and `ViewOn()` to propagate the layout markers `repacked`, `q8_0_aligned`, and `elem_kn_repacked`. `ViewOn` deliberately carries only `weight_value_dtype`: each `ResidentWeight` arm owns a different marker set and sets them explicitly after the call, and copying them centrally changed the CPU-alias lane for every model that shares the helper. The test and the code contradicted each other in the same commit, and `build-test-cpu` was skipping when #3095 merged so the failure was never caught. The fix corrects the check lambda to verify the actual contract: `weight_value_dtype` IS propagated, layout markers are NOT. The `Slice` guard is removed because `View()` no longer propagates `repacked`, so `Slice()` never throws on a view from an `OwnedTensor` that happens to have `repacked` set. This unblocks every PR that runs `build-test-cpu` (#3133, #3140, #2906, and others). Closes #3153. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:regolo/glm5.2 [maki] Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
localai-org-maint-bot
added a commit
that referenced
this pull request
Sep 12, 2026
…tive in LoadUnaligned (#3156) Closes #3155 `sanitize-cpu (address,undefined)` fails on every PR with a pre-existing UBSan alignment error inside `LoadUnaligned<T>` calls in the AVX2 and AVX512 element matmul kernels (`cpu_matmul_elem_avx2.cpp:231`, `cpu_matmul_elem_avx512.cpp:121`). `LoadUnaligned` uses `std::memcpy`, which is the correct way to read an unaligned address. GCC and Clang recognise that a small trivially-copyable `memcpy` is equivalent to a typed load and rewrite it as such under `-O2`. UBSan then flags the synthesised load as a misaligned access. Add `__attribute__((no_sanitize("alignment")))` to `LoadUnaligned` via a `VT_NO_SANITIZE_ALIGNMENT` macro (empty on MSVC). The attribute suppresses the alignment check inside this function only; it is a no-op when UBSan is not enabled. Confirmed pre-existing: appears on #2906 (Sept 5) and #3140 (Sept 11), independent of their changes. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:regolo/glm5.2 [maki] Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
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.
fix(QUANT-GGUF-CPU-THREADPOOL): floor the oversubscription threshold at 100 us so 4-vCPU CI does not flake
The ratio-based assertion ratio < 100.0 is calibrated on a 20-core box
where the fits arm measures ~1.7 us and the defect produces 3-6 ms.
On a 4-vCPU GitHub runner the arms are 2 and 5 threads, the fits arm can
measure 0.4 us, and normal scheduler jitter in the over arm (42 us) trips
the ratio at 101.5 against the 100.0 threshold.
Floor the right-hand side at 100.0 us: over_us < max(100.0 * fits_us, 100.0).
The defect this test guards produces a full scheduler timeslice (2999-5996 us),
so the 100 us floor sits ~30x below the defect floor and does not mask it.
Closes #3130
FOLLOWING_AGENTS_PROTOCOL
Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:GLM5.2 [MAKI]