Skip to content

VKNN 1.1.0

Choose a tag to compare

@katolikov katolikov released this 09 Jul 05:53
7014bdd

VKNN 1.1.0

3D Gaussian-splat rasterizer overhaul

  • The tile-entry sort is now a stable 4-pass LSD radix sort (replaces the padded bitonic network): ~30x less sort traffic at typical scene sizes.
  • Tile entries are emitted at per-gaussian scanned offsets: renders are byte-reproducible run-to-run and across devices.
  • Sort buffers persist across renders; the steady state is a single submission (no mid-render fence).
  • Opacity-aware binning radius and a per-quadrant coverage mask cull work that provably cannot contribute — output stays byte-identical while entry counts drop ~2.5-4.5x.
  • The compositor batches tile entries through shared memory and can pack ARGB on the GPU (no host conversion loop).
  • Render resolution is decoupled from the encoder input size; the demo app renders the orbit view at 512x512.
  • Net effect at 224x224: ~11x faster per render. The demo app orbits continuously while dragging (previously a render was issued only after lifting the finger).

Engine-resident I/O links (GPU-resident LLM KV cache)

  • New Session::linkOutputToInput API keeps designated outputs on the GPU and feeds them into the next run's inputs with ranged in-place copies — no host round-trip, values bit-exact.
  • The chat and VLM decode loops adopt it: the per-token KV transfer (tens of MB each way) disappears; measured decode step ~1.6x faster, in-app chat throughput up ~30%.
  • Host boundary pack/unpack conversions are parallelized (bit-identical output).

Correctness hardening

  • Unbound non-batch dynamic input dims are a hard compile error naming the dimension and the --dim flag to set (previously they silently froze, producing near-zero-cosine outputs on dynamic models).
  • GridSample: the GPU fp16 path now implements real cubic sampling (it previously fell back to bilinear silently), reads grid coordinates at fp32, and saturates its stores.
  • fp16 saturation to +/-65504 now also covers host boundary packs, weight uploads, and six overflow-capable kernels.
  • Rebinding an input with a shape that packs differently from the compiled plan is rejected (previously it silently misread memory).
  • Dynamic-shape chains resolve in one import pass; the shape-inference warning storm on deep encoders is gone.
  • Each planned bucket logs an un-throttled CPU-fallback summary (op counts and first node names), and vknn_run_io rejects input files whose size does not match the declared payload.

Demo app

  • At most one heavy model stays resident: loading a model in any mode frees the previously loaded one first (fixes the double-load out-of-memory), and every mode has an explicit Unload control.
  • App version 1.1 (versionCode 2).

Notes

  • The embedded shader set changed; per-model caches self-heal (one rebuild on first load).
  • The APK attached is debug-signed (no release keystore is configured for the demo app).