Commit Graph

1 Commits

Author SHA1 Message Date
Richard Loyer 1c25c975dc doc: PERF_ANALYSIS.md — diagnostic post-session, leviers triés ROI
Mesures (Pad3, CPU 4t/8t, KZTTS_CP_CACHE=1, 31 frames) :
  pipeline 7.9s / 2.58s audio = RTF 3.07
  breakdown : prefill 1.3% / talker 12.6% / CP 43% / decoder 43%
  decoder breakdown via KZTTS_DECODER_PROFILE=1 :
    BigVGAN 95.3% (3.24s), upsample 2.8%, reste <1% chacun

Diagnostic :
  - CP BW-bound : 15 sub-forwards/frame stream 125 MB de poids f16 chacun,
    thread sweep 4/6/8 plat = pas compute-bound. ~75% overhead ggml_init/free.
  - BigVGAN compute-bound NEON : ~500 Gops, mesure 3.2s = ~95% du plafond
    NEON. Pas de gain multi-thread.
  - Talker pas un levier (1s total).

Leviers ROI décroissant :
  B. CP ctx réutilisé entre 15 sub-forwards (½ session, RTF 3.07->2.4, bit-exact)
  A. Streaming pipeline talker/CP/decoder (1 session, TTFB ~500ms, bit-exact)
  F. CP forward sur HMX V79 (1 session, RTF->~1.5, réutilise pattern Qwen3.5)
  E. BigVGAN HMX (conv1d via im2col+matmul fp16 tile, 2-3 semaines, RTF->~0.7)

Cible RTF<1 demande E (gros chantier kernel hexagon). Cible RTF~2 avec TTFB
500ms = B+A en 2 sessions, suffit probablement pour démo app.

Le patch decoder.cpp pour le profile (KZTTS_DECODER_PROFILE=1) est local dans
/opt/Kazeia/kazeia-tts-decoder-ggml, pas dans Kazeia-engine.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 22:43:23 +02:00