[Benchmark] RX 6600M / Inkling-2 Mini SQ-15: reuse FP8 K/V across GQA heads on HIP

Abierto
#7,313 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 4 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
42/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
cpp, linux

Línea de trabajo

Read ink_hip_ops.hip.h and ink_hip_backend.hip.cpp, then reproduce the two opt-in FP8 attention switches on an RX 6600M (gfx1032) using the provided command and baseline settings. Compare kernel timings and outputs for the grouped prefill and single-token split-KV paths; done means the changes are independently evaluable and preserve the reported bitwise-equal outputs. The issue requests interest in a PR, so confirm maintainer direction before investing in implementation.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

On an RX 6600M, two opt-in FP8 attention changes reduced full-model time to the first token from 26.95 to 25.78 s for a 1,024-token prompt across five paired runs. The separate global attention kernel at position 32,768 went from 543.33 to 141.43 ms with a 256-token prefill chunk. Would you be interested in an opt-in PR for the HIP/RDNA2 path?

Changes. In ink_hip_ops.hip.h and ink_hip_backend.hip.cpp, one wave loads and unpacks K/V once for the three query heads that share it in the 24:8:128 GQA geometry. Each query head still computes its own scores and softmax in its original order. A 256-entry FP32 table in LDS is built using the existing E4M3 conversion, and the single-token split-KV path can use the same lookup technique. The grouped path is gated to gfx1032, FP8 KV, contiguous single-slot prefill, and B ≥ 64. The two switches can be evaluated independently.

Full-model median Baseline Both switches
Prefill, 1,024 tokens 38.00 tok/s 39.73 tok/s
Decode, 80-token response to that prompt 13.44 tok/s 13.67 tok/s
Total time, same prompt and response 32.94 s 31.56 s
Decode, 136-token prompt 13.53 tok/s 14.50 tok/s

strata-rdna2-fp8-attention-repro.zip

All five pairs favored the candidate on total time for the 1,024-token prompt. All ten 80-token responses to that prompt matched. Short-prompt free generations varied even across baseline runs. A separate fixed-input check (64-token batch followed by a single token) matched 13,003,770 FP32 logits bit for bit. The timings use one local engine binary with fresh processes in AB/BA pairs, zero prefix reuse and zero storage reads during the requests.

Kernel-only results. HIP events with synthetic FP8 K/V, production head geometry and bitwise-equal outputs: at B=256 and position 32,768, global attention took 543.33 → 141.43 ms and sliding-window attention 16.25 → 5.49 ms. One-token global split-KV attention at position 30,720 took 2.193 → 1.006 ms. These numbers cover attention kernels. The 32K full-model speedup remains unmeasured. The candidate run on 3,072 input tokens stopped at the system RAM guard and is excluded from paired timings.

Reproduction. RX 6600M (gfx1032, 8 GiB), Ryzen 5 5600H, 16 GB RAM, Ubuntu 24.04, local HIP strata-inkling 0.1.67, native Inkling-2-Mini-SQ-15.strata. Both arms held 1,148 experts in VRAM and 1,924 in RAM. Both retained the same earlier local optimizations, including the Q8ROW projection reported in #7260.

STRATA_INK_FP8_ATTN_LUT=1 STRATA_INK_GROUPED_FP8_PREFILL=1 \
  ./strata-inkling --serve --native "$MODEL" --max-context 4096 \
  --kv fp8 --draft off --vram-experts-gb 4.87 --vram-reserve-mib 512 \
  --chunk 128 --threads 6 --ram-experts-gb 7.00

Use 0 for both switches in the baseline arm. The related CUDA prefill report #7031 covers repeated packing across query blocks. This report concerns shared FP8 reads and conversion across HIP query heads.

Lenguaje dominante
C++
Estrellas
11.6k
Forks
1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Niko1221/Strata

Todos los issues de Niko1221/Strata

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.