Skip to content

BioForge v6.2.0 — int16 SIMD extension (narrows the single-thread gap)

Choose a tag to compare

@erlanders177 erlanders177 released this 09 Jul 21:39
· 93 commits to main since this release

The anti-diagonal banded kernel gains a 16-bit variant that processes twice the
cells per instruction when scores fit (reads <= 12,000 bp); longer reads stay on
int32. Multi-core stays on par with minimap2.

── Install ──────────────────────────────────────────────────
pip install bioforge

Requirements

  • Python >= 3.10
  • NumPy >= 1.24 (the only runtime dependency — no Biopython, no heavy deps)
  • The C engine ships PRE-COMPILED inside native wheels for Windows, Linux and
    macOS — no compiler needed. Falls back to the pure-NumPy path elsewhere.

── What changed ─────────────────────────────────────────────
Added

  • _nw_banded_diag_simd_i16: AVX2 int16 (16-lane) version of the banded
    anti-diagonal kernel, with a 16x int16 reversal (per-lane shuffle + half swap).
    A dispatcher routes by size: int16 (m,n <= 12000) -> int32 (8-lane) -> scalar
    (no AVX2). Bit-identical to the scalar kernel (same DP and tie-break).

Performance (honest — WSL, 4.8 Mb, 6000 reads, 5% error, minimap2 -a)

  • Extension kernel 2000x2000: 1.42x over int32 (the theoretical 2x is diluted by
    fixed costs — malloc, traceback, edges — that don't vectorise).
  • 1 thread: BioForge ~1.87 vs minimap2 ~2.2 Mb/s -> ~1.18x behind (was ~1.3x).
  • 4 cores: on par / ahead (~4.3-5.0 vs ~4.3-4.9). Both map all 6000.
  • The rest of the single-thread gap is split between seeding (~25%) and chaining
    (~34%); closing it fully is diminishing returns.

Tests

  • int16<->core kernel parity clean (incl. N, edges, narrow band); valgrind clean
    (0 errors / 0 leaks) on the int16 path with its 16-lane reversal. 361 tests.