Skip to content

feat(opp,routing): add multi-OPP serial MIF knee, FP16 dequant routing, SRAM cliff, and multi-overlay composition - #52

Merged
saariuslystoned merged 1 commit into
mainfrom
feat/opp-mif-knee-and-cxtp-routing
Nov 30, 2026
Merged

saariuslystoned merged 1 commit into
mainfrom
feat/opp-mif-knee-and-cxtp-routing

Conversation

@saariuslystoned

Copy link
Copy Markdown
Contributor

Summary

Extends freesched (C11/C++17) and freesilicon-twin (Python) with generic, SoC-agnostic multi-OPP & serial-bus memory fabric modeling, asymmetric FP16-dequant vs INT8-dot precision routing, accelerator SRAM residency cliff modeling, sync-bridge quirk selection, and ordered multi-overlay composition:

  1. Multi-OPP & Serial Multi-Bus Fabric Model (include/freesched.h, src/fs_topology.cpp, src/fs_router.cpp):
    • Adds fs_opp_point_t, fs_opp_policy_t (FS_OPP_POLICY_PEAK, FS_OPP_POLICY_EFFICIENCY, FS_OPP_POLICY_BALANCED), fs_eval_serial_bus_bw_gbps() (strict minimum across series-coupled fabric buses), and fs_select_opp_point() (maximizing throughput, throughput/total-watt knee, or balanced efficiency).
    • Preserves zero-init backward compatibility with existing callers.
  2. Asymmetric Precision Routing & Accelerator SRAM Cliff (src/fs_router.cpp, python/freesilicon_twin/roofline.py):
    • Routes quantized GPU matmuls via packed FP16 dequant (prefer_fp16_dequant or peak_tops_int8 * 1000 < peak_gflops_fp16) instead of slower INT8 dot4x8.
    • Clamps effective memory bandwidth to sram_spill_bw_gbps / tpu_weight_stream_peak_gbps when accelerator weight tensors exceed on-chip SRAM capacity (sram_cliff_hit).
  3. Sync-Bridge Quirk Selection (include/freesched.h, src/fs_topology.cpp, src/fs_executor.cpp):
    • Adds fs_sync_bridge_mode_t and fs_select_sync_bridge() selecting FS_SYNC_BRIDGE_SYNC_FILE when iif_kthread_quirk is active on non-TPU -> TPU handoffs and FS_SYNC_BRIDGE_IIF_TIMER when clean.
  4. Ordered Multi-Overlay Composition (python/freesilicon_twin/{profiles.py,cli.py,roofline.py,schema.py}):
    • Supports repeatable --profile-overlay flags and separated FREESILICON_TWIN_OVERLAY lists with fail-closed validation and deep-copy isolation of bundled profiles (zero private calibration payloads bundled).

Verification

  • make verify-headers (32 strict -std=c11 / -std=c++17 -Wall -Wextra -Werror checks): PASS
  • FREESCHED_MOCK=1 ./build/test_c11_abi: PASS
  • FREESCHED_MOCK=1 ./build/test_freesched (13/13 suites): PASS
  • FREESCHED_MOCK=1 ./build/freesched_dmabuf_smoke --profile malibu --mock --json: PASS (zero_copy_handoffs=3, fallback_copies=0)
  • Python test suite (58/58 tests) & ./twin/freesilicon-twin self-test (schema_errors=0): PASS
  • ./scripts/clean-room-audit.sh: PASSED across 157 files (0 errors)

Signed-off-by: Bobby Bones <saariuscrypto@gmail.com>
@saariuslystoned
saariuslystoned merged commit a7cd8c5 into main Nov 30, 2026
8 of 10 checks passed
@saariuslystoned
saariuslystoned deleted the feat/opp-mif-knee-and-cxtp-routing branch November 30, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant