Category: test-coverage / SIMD dispatch — surfaced by the coverage comment on PR #287 (a one-line dorny/paths-filter dependabot bump that changes no Rust code).
Problem
src/bits/popcount.rs swings ±26pp on the x86_64 coverage leg between otherwise-unrelated PRs, because its AVX-512 VPOPCNTDQ path is only executed on runners whose CPU actually has the instruction. The x86 SIMD gate (.github/workflows/ci.yml:76) pins SUCCINCTLY_EXPECT_SIMD: sse2,sse4.2,avx2,bmi2,popcnt — avx512vpopcntdq is deliberately not required (GitHub-hosted ubuntu-latest doesn't guarantee it). So on the coverage job (also ubuntu-latest), the AVX-512 region is present-but-uncalled on some hosts and executed on others.
The CPU-gated lines, all compiled under --features cli,simd,regex,serde but only reachable with avx512vpopcntdq:
popcount_words_avx512vpopcntdq body — popcount.rs:218-245 (loop, _mm512_loadu_si512, _mm512_popcnt_epi64, _mm512_reduce_add_epi64, scalar tail).
- The runtime-dispatch arm in
popcount_words_x86 — popcount.rs:261-266 (if is_x86_feature_detected!("avx512vpopcntdq") { return unsafe { … } }).
- Both host-gated tests, which early-return on non-supporting CPUs and so neither cover nor validate the kernel there:
That's ~30 executable lines counted in the file's denominator but coverable only on AVX-512-VPOPCNTDQ hardware.
Evidence
PR #287's coverage-x86_64 comment flagged src/bits/popcount.rs 92.86% → 66.43% (🔴 -26.43pp) under "1 unchanged file(s) also moved (not attributed to this PR)". The diff is a single line in ci.yml — the swing is purely that the main baseline run and the PR-head run drew different runner CPUs (one with the VPOPCNTDQ instruction, one without).
Why this isn't already covered / caught
Unlike the SSE2 (#247) and DSV-dispatch (#283) cases, this path cannot be forced on a CPU that lacks the instruction: _mm512_popcnt_epi64 will SIGILL there, and a software shim would no longer be testing the intrinsic. So the AVX-512 kernel's correctness is inherently only verifiable on AVX-512 hardware, and its coverage is inherently non-deterministic across GitHub's runner fleet.
Practical severity: low (cosmetic)
- The coverage bot already quarantines this into "unchanged files … not attributed to this PR" and does not count it as a patch-coverage regression.
- The
fail-under-lines: 55 gate (ci.yml:523) has ~19pp of headroom over the ~74.5% total, so a one-file -26pp wobble won't trip it.
So this is recurring visual noise in the sticky comment, not a gate or correctness problem. Filing it so the noise is understood and (optionally) silenced deterministically, rather than re-diagnosed on every unrelated PR.
Options (pick one)
- Exclude the hardware-gated region from coverage measurement so
popcount.rs reports a stable number regardless of runner CPU. Depends on what action-works/omni-dev-coverage-check / cargo-llvm-cov expose — nightly #[coverage(off)] on popcount_words_avx512vpopcntdq + the dispatch arm + the two host-gated tests, or --ignore-filename-regex for the whole file, or an omni-dev ignore-list config. (Preferred if a region-level mechanism exists; whole-file exclusion is the blunt fallback.)
- Teach
omni-dev coverage diff to suppress a configured allowlist of known-CPU-conditional files (src/bits/popcount.rs, and arguably the src/dsv/simd/* and src/yaml/simd/* dispatchers) from the "unchanged files also moved" section, so they never surface as noise on unrelated PRs. (Upstream change in the action/omni-dev, not this repo.)
- Pin the coverage runner to a CPU class that has AVX-512 VPOPCNTDQ (deterministic-up), or add
avx512vpopcntdq to a dedicated expect-simd leg. Fragile — GitHub-hosted runner CPUs aren't contractually stable — and it would then require the feature, which contradicts the current intentional non-requirement.
- Accept the noise, document it. Add a short note (CONTRIBUTING.md "SIMD CI coverage" section, near the existing expect-simd guidance) explaining that
popcount.rs flaps by design, so it isn't re-triaged each time. Cheapest; no determinism gain.
Definition of done
src/bits/popcount.rs's x86 coverage number is deterministic across runner CPUs or the flap is explicitly documented so it's not re-investigated per PR.
- No change to production popcount dispatch or the intentional non-requirement of
avx512vpopcntdq.
- If code/config is touched: clippy
--all-targets --all-features -D warnings clean; conventional commit with the appropriate scope.
Related
Category: test-coverage / SIMD dispatch — surfaced by the coverage comment on PR #287 (a one-line
dorny/paths-filterdependabot bump that changes no Rust code).Problem
src/bits/popcount.rsswings ±26pp on the x86_64 coverage leg between otherwise-unrelated PRs, because its AVX-512 VPOPCNTDQ path is only executed on runners whose CPU actually has the instruction. The x86 SIMD gate (.github/workflows/ci.yml:76) pinsSUCCINCTLY_EXPECT_SIMD: sse2,sse4.2,avx2,bmi2,popcnt—avx512vpopcntdqis deliberately not required (GitHub-hostedubuntu-latestdoesn't guarantee it). So on the coverage job (alsoubuntu-latest), the AVX-512 region is present-but-uncalled on some hosts and executed on others.The CPU-gated lines, all compiled under
--features cli,simd,regex,serdebut only reachable withavx512vpopcntdq:popcount_words_avx512vpopcntdqbody —popcount.rs:218-245(loop,_mm512_loadu_si512,_mm512_popcnt_epi64,_mm512_reduce_add_epi64, scalar tail).popcount_words_x86—popcount.rs:261-266(if is_x86_feature_detected!("avx512vpopcntdq") { return unsafe { … } }).test_avx512_vpopcntdq_matches_scalar— guard atpopcount.rs:407-410.test_avx512_edge_cases— guard atpopcount.rs:444-446.That's ~30 executable lines counted in the file's denominator but coverable only on AVX-512-VPOPCNTDQ hardware.
Evidence
PR #287's
coverage-x86_64comment flaggedsrc/bits/popcount.rs92.86% → 66.43% (🔴 -26.43pp) under "1 unchanged file(s) also moved (not attributed to this PR)". The diff is a single line inci.yml— the swing is purely that themainbaseline run and the PR-head run drew different runner CPUs (one with the VPOPCNTDQ instruction, one without).Why this isn't already covered / caught
Unlike the SSE2 (#247) and DSV-dispatch (#283) cases, this path cannot be forced on a CPU that lacks the instruction:
_mm512_popcnt_epi64willSIGILLthere, and a software shim would no longer be testing the intrinsic. So the AVX-512 kernel's correctness is inherently only verifiable on AVX-512 hardware, and its coverage is inherently non-deterministic across GitHub's runner fleet.Practical severity: low (cosmetic)
fail-under-lines: 55gate (ci.yml:523) has ~19pp of headroom over the ~74.5% total, so a one-file -26pp wobble won't trip it.So this is recurring visual noise in the sticky comment, not a gate or correctness problem. Filing it so the noise is understood and (optionally) silenced deterministically, rather than re-diagnosed on every unrelated PR.
Options (pick one)
popcount.rsreports a stable number regardless of runner CPU. Depends on whataction-works/omni-dev-coverage-check/cargo-llvm-covexpose — nightly#[coverage(off)]onpopcount_words_avx512vpopcntdq+ the dispatch arm + the two host-gated tests, or--ignore-filename-regexfor the whole file, or an omni-dev ignore-list config. (Preferred if a region-level mechanism exists; whole-file exclusion is the blunt fallback.)omni-dev coverage diffto suppress a configured allowlist of known-CPU-conditional files (src/bits/popcount.rs, and arguably thesrc/dsv/simd/*andsrc/yaml/simd/*dispatchers) from the "unchanged files also moved" section, so they never surface as noise on unrelated PRs. (Upstream change in the action/omni-dev, not this repo.)avx512vpopcntdqto a dedicated expect-simd leg. Fragile — GitHub-hosted runner CPUs aren't contractually stable — and it would then require the feature, which contradicts the current intentional non-requirement.popcount.rsflaps by design, so it isn't re-triaged each time. Cheapest; no determinism gain.Definition of done
src/bits/popcount.rs's x86 coverage number is deterministic across runner CPUs or the flap is explicitly documented so it's not re-investigated per PR.avx512vpopcntdq.--all-targets --all-features -D warningsclean; conventional commit with the appropriate scope.Related
SUCCINCTLY_EXPECT_SIMD(tests/simd_expectation_tests.rs) pins required features but intentionally omitsavx512vpopcntdq.