Kazeia-engine/dist/jni
Richard Loyer 48c66c03e1 chantier F (CP HMX) : path sched livré, gain absent (overhead per-call)
cp_inference.h/.cpp : nouveau cp_load_with_backends + sched path dans
cp_forward_cached_step. KV cache aussi alloué sur backend buffer en mode sched
(no_alloc=true + ggml_backend_alloc_ctx_tensors_from_buft). Inputs (x, pos_ids,
mask) marqués ggml_set_input ; output ggml_set_output. Compute via sched_reset
+ alloc + tensor_set + sched_compute + tensor_get. Path legacy CPU pur (sans
sched) reste intact via détection s.sched.

tts_engine.cpp : KZTTS_CP_HTP=1 + KZTTS_CP_SCHED=1 active le path sched HMX.
KZTTS_CP_HTP=1 seul = poids HTP, compute CPU pur via opt_hostbuf=1 (baseline).

Mesures Pad3 (KZTTS_CP_CACHE=1, seed=42, 'Bonjour Kazeia') :
  CPU baseline                  : CP 111 ms/frame, RTF 2.95, N=33
  CP poids HTP, compute CPU     : CP 108 ms/frame, RTF 2.93, N=33  (~baseline)
  CP sched HMX (HTP-routé)      : CP 181 ms/frame, RTF 3.87, N=64  REGRESSION

GGML_SCHED_DEBUG=2 confirme que ~95% des MUL_MAT CP tombent bien sur HTP0
(blk.0.attn_q.weight : 360 HTP / 21 CPU). Donc HMX est techniquement actif.

Cause de la régression :
  - Overhead par sub-forward sched_reset + sched_alloc_graph + tensor_set/get
    × 15 sub-forwards par frame. ~5 ms/appel × 15 = 75 ms ajoutés par frame
    (cohérent avec 111 -> 181 ms).
  - N=64 vs N=33 = trajectoire talker diverge à cause des codes CP qui
    diffèrent (perte précision HMX f16 tile vs CPU NEON f32).

Pour livrer un gain CP HMX réel, il faudrait :
  - (a) ctx persistant entre sub-forwards (~refactor architectural)
  - (b) batcher les 15 sub-forwards en 1 graph autoregressif (~lourd)

Le path sched CP est laissé en opt-in (KZTTS_CP_SCHED=1, désactivé par défaut)
pour itérer dessus ultérieurement. KZTTS_CP_HTP=1 seul est neutre (~baseline).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-29 16:03:41 +02:00
..
EngineLlmEngine.kt chantier B TTS #1: API JNI embeds-only + M-RoPE qwen3 dense 2026-05-28 13:37:17 +02:00
TtsEngine.kt chantier B TTS #11: libkazeia_tts.so + Kotlin wrapper, JNI validé bout-en-bout 2026-05-28 21:54:21 +02:00
build_prefill.cpp chantier B TTS #4: P3.1+P3.2 = x_vector + prefill_embeds depuis input_ids (bit-exact) 2026-05-28 15:05:23 +02:00
cp_inference.cpp chantier F (CP HMX) : path sched livré, gain absent (overhead per-call) 2026-05-29 16:03:41 +02:00
cp_inference.h chantier F (CP HMX) : path sched livré, gain absent (overhead per-call) 2026-05-29 16:03:41 +02:00
cp_validate.cpp chantier B TTS #5: P3.3 = vrai CP runner intégré (bit-exact) 2026-05-28 15:11:07 +02:00
dual_ctx.cpp dist: prefill HTP = CASSÉ (sortie charabia), prefill obligatoirement CPU 2026-05-27 09:42:59 +02:00
dual_ctx_mt.cpp dist: JNI option C câblé (prefill HTP / decode CPU), validé multi-tour 2026-05-27 10:24:55 +02:00
kazeia_engine_jni.cpp chantier B TTS #2: fix M-RoPE positions en embeds-mode + validation bit-exact 2026-05-28 13:54:03 +02:00
kazeia_text_tokenizer.cpp chantier B TTS #10: tokenizer Qwen3 BPE via llama_tokenize, texte arbitraire 2026-05-28 21:21:53 +02:00
kazeia_text_tokenizer.h chantier B TTS #10: tokenizer Qwen3 BPE via llama_tokenize, texte arbitraire 2026-05-28 21:21:53 +02:00
kazeia_tts_jni.cpp chantier B TTS #11: libkazeia_tts.so + Kotlin wrapper, JNI validé bout-en-bout 2026-05-28 21:54:21 +02:00
sampler.cpp chantier B TTS #7: sampler HF-style top_k+top_p+rep_penalty (générique) 2026-05-28 16:55:05 +02:00
sampler.h chantier B TTS #7: sampler HF-style top_k+top_p+rep_penalty (générique) 2026-05-28 16:55:05 +02:00
test_engine.c Valide device: generate() bout-en-bout OK (test_native), bridge pret integration 2026-05-24 22:05:44 +02:00
test_engine.cpp Valide device: generate() bout-en-bout OK (test_native), bridge pret integration 2026-05-24 22:05:44 +02:00
test_engine_2calls.cpp chantier B TTS #11: libkazeia_tts.so + Kotlin wrapper, JNI validé bout-en-bout 2026-05-28 21:54:21 +02:00
test_jni_native.cpp dist: multi-tour propre (generateRaw + ChatSession) + JNI validé end-to-end natif 2026-05-27 11:18:20 +02:00
test_jni_tts.cpp chantier B TTS #11: libkazeia_tts.so + Kotlin wrapper, JNI validé bout-en-bout 2026-05-28 21:54:21 +02:00
test_native.cpp v4 fix #277: ngl0 CPU decode 14tok/s, 4s/tour, usable 2026-05-25 10:18:31 +02:00
test_talker.cpp chantier B TTS #1: API JNI embeds-only + M-RoPE qwen3 dense 2026-05-28 13:37:17 +02:00
test_talker_replay.cpp chantier B TTS #2: fix M-RoPE positions en embeds-mode + validation bit-exact 2026-05-28 13:54:03 +02:00
test_tokenizer.cpp chantier B TTS #10: tokenizer Qwen3 BPE via llama_tokenize, texte arbitraire 2026-05-28 21:21:53 +02:00
tts_engine.cpp chantier F (CP HMX) : path sched livré, gain absent (overhead per-call) 2026-05-29 16:03:41 +02:00
tts_engine.h chantier B TTS #11: libkazeia_tts.so + Kotlin wrapper, JNI validé bout-en-bout 2026-05-28 21:54:21 +02:00
tts_orchestrate.cpp chantier B TTS #6: P3.4+P3.5 = pipeline complet 100% tablette bout-en-bout 2026-05-28 15:25:00 +02:00
tts_pipeline.cpp chantier B TTS #11: libkazeia_tts.so + Kotlin wrapper, JNI validé bout-en-bout 2026-05-28 21:54:21 +02:00