Feature/skeep 005 compiled leg - #424
Conversation
…tructure SKEEP-005 phase 2, "structure at compile time". The engine's SDPA is now grouped-query native, so the recording paths of MultiHeadAttention and HybridTransformerBlock hand K/V to it with their own head count — repeatKVHeads (nKV × narrow + concat per K and V per layer per step) is gone from tapes, traced graphs and exports. The SmolLM2 and FunctionGemma export harnesses run ScheduleAnnotationPass before conversion, so every exported attention states parallel_dims = [batch, heads] in the advisory skainet.schedule header; no core count is written into a module. Tests: MultiHeadAttentionRecordingGqaTest (tape carries no narrow/concat, sdpa sees K/V with nKVHeads, recorded == eager); the schedule parity suite covers the GQA-native op on (8,2) and (4,2). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ty; phase-2 docs SKEEP-005 phase 2, "cores at run time": - iree-android: IreeRedecodeSession(taskTopologyGroupCount) → new JNI nativeCreateWithTopology feeds --task_topology_group_count to IREE's flag parser (iree/base/tooling/flags.h) before the local-task device is created, the same knob iree-run-module takes; nativeCreate is unchanged. A stale .so fails loudly (UnsatisfiedLinkError → IllegalStateException). New IreeTaskTopology (SKAINET_TASK_GROUPS, groupCountFor(schedule.parallelism)); IreeRedecodeDecoder.fromAssets defaults to the env knob. Both ABIs' libskainet_iree_redecode.so rebuilt with skainet/iree-android:3.11.0 (+ --link iree_base_tooling_flags iree_task_api); unit test IreeTaskTopologyTest. - gemma-iree: reads SKAINET_TASK_GROUPS, GEMMA_TASK_GROUPS as deprecated alias. - llama: OptimizedModeScheduleParityTest — compiled runtimes (ComputeGraphExecutor over ctx.ops) are bit-identical between Sequential and CoroutineSchedule.hardware() at every step on SmolLM2-135M (9 heads / 3 KV heads, GQA-native SDPA node) and match the eager leg at position 0 within 2e-5. Later positions diverge by the documented OPTIMIZED limitation (frozen KV/position in the shape-[1] snapshot), not by the schedule. No measurable speedup there: ≈1.18 s/step both ways. - Docs: spec "Phase 2" + AS-9..12, explanation "The compiled leg" (diagram), IREE Android runtime reference "Task topology", eager-vs-compiled row, compile-model-for-android notes, CHANGELOG. API dumps refreshed (additive). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Conflicts: CHANGELOG (phase-2 entry stays under Unreleased, above 0.55.0), the SmolLM2 and FunctionGemma export harnesses (schedule stamping + BufferHandle byte access both kept), IreeRedecodeSession (module-qualified function name now feeds both nativeCreate and nativeCreateWithTopology), and libskainet_iree_redecode.so for both ABIs, rebuilt from the merged JNI source with --vulkan.
…com/SKaiNET-developers/SKaiNET-transformers into feature/skeep-005-compiled-leg
|
Merged Local verification on the merged branch: Blocked on the engine: |
Grouped-query-native scaledDotProductAttention and the schedule-aware graph contexts this branch relies on ship in SKaiNET 0.56.0.
|
SKaiNET 0.56.0 is on Maven Central (grouped-query-native Locally against the released engine (fresh resolution, nothing in |
No description provided.