Architecture Runtime To SYCL Traceability - kennetholsenatm-gif/q_mini_wasm_v2 GitHub Wiki
This document maps the executable path from runtime task orchestration to SYCL-enabled acceleration surfaces and highlights current implementation gaps. It is intended as an auditable bridge between architectural intent and implementation reality.
-
Runtime task submission
- File:
q_mini_wasm_v2/runtime/orchestrator.hpp - Entry points:
submit_tableau_update(...)submit_moe_routing(...)submit_ff_training(...)
- File:
-
Task execution loop
- File:
q_mini_wasm_v2/runtime/orchestrator.cpp - Worker threads pop lambda tasks from
task_queue_and execute on CPU.
- File:
-
Core subsystem invocation
- Stabilizer:
q_mini_wasm_v2/core/stabilizer/* - MoE:
q_mini_wasm_v2/core/moe/* - Forward-Forward:
q_mini_wasm_v2/core/learning/*
- Stabilizer:
-
SYCL acceleration surfaces (declared)
q_mini_wasm_v2/sycl/tableau_kernels.hpp/.cppq_mini_wasm_v2/core/qgnn/message_passing_sycl.hpp/.cpp
-
Build-time SYCL enablement
- File:
q_mini_wasm_v2/CMakeLists.txt - Gate:
-DUSE_SYCL=ON - Providers: IntelSYCL / AdaptiveCpp / oneAPI env fallback
- File:
-
WASM bridge interface
- File:
q_mini_wasm_v2/dll/wasm_bridge/wasm_api.cpp
- File:
- Exposes SYCL init/map/dispatch calls with extensive CPU fallback behavior.
| Stage | Artifact | Current State | Evidence |
|---|---|---|---|
| Runtime orchestration | runtime/orchestrator.* |
Implemented CPU thread pool | Task queue and worker loop are active in orchestrator.cpp
|
| SYCL kernel declarations | sycl/tableau_kernels.* |
Implemented but mostly isolated | Primarily referenced by tests/test_sycl_kernels.cpp
|
| QGNN SYCL kernels | core/qgnn/message_passing_sycl.* |
Implemented | Dedicated SYCL queue and kernels present |
| Build integration | CMakeLists.txt |
Implemented |
USE_SYCL option and package detection in CMake |
| Runtime→SYCL wiring | Orchestrator to SYCL calls | Partial / weak coupling |
submit_* methods in runtime/orchestrator.cpp call CPU lambdas/core APIs directly; no direct dispatch to sycl_kernels::parallel_apply_*
|
| WASM SYCL bridge | dll/wasm_bridge/wasm_api.cpp |
Partial with CPU fallback dominance | Multiple explicit "CPU fallback" and future SYCL TODO-style notes |
-
RuntimeOrchestratordoes not directly dispatch tosycl_kernels::parallel_apply_*paths. - Existing SYCL kernels are validated mostly by tests and standalone modules.
-
wasm_api.cppcontains many paths where SYCL is initialized but execution still uses CPU fallback logic. - Several command handlers include explicit placeholders for future SYCL kernel dispatch.
- Some architecture docs overstate purity/completeness versus measured enforcement output.
- This traceability file is the canonical reconciliation point for runtime/SYCL execution path status.
runtime/orchestrator.cpp-
submit_tableau_update,submit_moe_routing, andsubmit_ff_trainingenqueue CPU lambdas; no direct invocation ofsycl_kernels::*APIs in the orchestrator path. sycl/tableau_kernels.cpp- File includes explicit section header:
Parallel Tableau Operations (CPU fallback without SYCL). - Routing helper currently uses floating point (
std::vector<double>logits), which conflicts with strict GF(3)-only core purity expectations. dll/wasm_bridge/wasm_api.cpp- Contains explicit fallback notes (
using CPU fallback,Future: Implement proper SYCL kernel dispatch) in command execution paths.
- Runtime orchestrator task types map to concrete SYCL dispatch adapters in production code paths (not only tests).
- Bridge command handlers execute SYCL kernels where feature flags indicate SYCL availability; fallback paths are explicit and intentionally gated.
- Strict GF(3) constrained modules avoid floating-point routing/attention logic.
- CI evidence links each traceability row to executable validation (tests and/or runtime probes).
- All recommended remediation must preserve:
- GF(3)-only stabilizer loop semantics in core constrained paths
- Forward-Forward only learning updates (no global gradient methods)
- MCP-only communication for agent/gateway pathways
- Wire orchestrator task types to explicit SYCL dispatch adapters where available.
- Replace CPU-fallback placeholders in
wasm_api.cppcommand paths with real SYCL kernels or mark as intentionally disabled behind strict feature flags. - Keep this matrix updated with each integration milestone and CI evidence.