Skip to content

SOLAR cost-based CPU vs GPU unpack/staging selector with CPU default fallback #3

Not planned

Description

@saariuslystoned

Summary

Implement a SOLAR-calibrated heterogeneous backend selector for MoE expert unpacking/staging and compute routing into shared DMA-BUF buffers, with ARMv9 CPU (NEON/SVE2) as the default and permanent fallback.

Architecture

  • CPU default & guaranteed fallback: Keep ARMv9 NEON/SVE2 unpack/staging into DMA-BUF as the default path. At small batch sizes (e.g., batch-1 MoE decode), CPU launch overhead (< 1 µs) beats Vulkan/GPU submit + fence round-trip (~50–150 µs), avoids waking the GPU over the shared LPDDR5X bus, and prevents compositor contention (e.g., 120Hz Wayland/Hyprland display). Works automatically on headless or no-GPU boots.
  • Per-SoC micro-benchmark: Add a one-time calibration benchmark per chip (Tensor G5, Tensor G6, etc.) measuring CPU vs. Vulkan/GPU latency across chunk sizes (M=1 decode vs. M >= 64 prefill / attention / vision workloads) and feeding results into the SOLAR roofline cost model.
  • Dynamic dispatch rule: Select GPU only when:
    1. gpu_compute + submit_overhead < cpu_time for the target workload shape, and
    2. Display/compositor contention is below threshold.
      Otherwise fall back to CPU automatically.

Acceptance Criteria

  • CPU NEON/SVE2 unpack/staging into DMA-BUF runs as the default backend with zero GPU dependency.
  • On-device micro-benchmark measures CPU vs. Vulkan compute + sync_file fence overhead across payload sizes and emits a reusable SOLAR calibration profile.
  • Scheduler selector routes automatically based on calibrated SOLAR cost + compositor contention budget, falling back cleanly to CPU if GPU is unavailable or busy.
  • Unit tests + live hardware latency receipt comparing CPU-only, GPU-only, and SOLAR-selected hybrid pipelines.

Timing

Queued for after live Volcanic Vulkan compute (freepvr) and unified desktop bring-up stabilize on hardware.

Activity

  1. saariuslystoned commented on Nov 30, 2026

    @saariuslystoned
    ContributorAuthor

    Closing: superseded by silicon-verified shader-direct F16Crouton_TCM tiling (#51) and FP16 dequant routing (#52). (closed alongside PR #32).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions