[Engine] gfx906 (Instinct MI50 32 GB) & UD-IQ4_XS: sub-8 Q5_0 down kernel, 1-dp4a i-quant sign negation, and multi-row wave64 MMVQ (+20% c1 / +18.5% c4)
Maintainer thường phản hồi trong vòng 4 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 1/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- cpp
- Lĩnh vực
- backend, performance
Hướng nghiên cứu
The issue reports kernel work in iq_kernels.cu and native_mmvq.cu, with three follow-up pull requests (#7272, #7273, and #7274) covering the changes. Read those pull requests and their benchmarks first; this issue’s work is already split into active implementation efforts. Completion is described by the reported MI50 kernel timings, throughput gains, and 128K needle checks.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem and result
On Qwen3.8-Flash-Next (UD-IQ4_XS, 131,072 context) served on an AMD Instinct MI50 32 GB (gfx906, 100 W power cap, ROCm 7.2.4), profiling the verify and batch-4 decode windows showed three kernel bottlenecks and one host-exchange bottleneck:
Q5_0down projections (31 of 48 layers inUD-IQ4_XS) had noSplit<6>/S27<6>trait and were excluded fromlds_down_ok(native_down_lds_kernel). Even underSTRATA_EXP_MODE=7or8, 31 of 48 layers fell back tonative_down_kernel<6>, which neither stageshqin LDS nor reuses unpacked weights across verify/batch tokens (166 GB/satT=1, dropping to58 GB/satT=4).gfx906has no hardware byte-SIMD instructions (__vcmpne4,__vsub4).strata_hip.hemulates each call with ~12 word operations. WhileDotG<*, 1>(modes 5–7) avoided this vianib_mask+ twodp4acalls,Split<16/17/18/21/22>(used bySTRATA_EXP_MODE=8'snative_gu_fused_kernelandnative_gu_multi_kernel) andvec_dot_iq2/3_*still used the emulated__vcmpne4/__vsub4path wheneverSTAGE_GRIDwas false or not applicable (IQ2_Slayer 8 gate/up ran at 158.8 us / 106 GB/s atT=1).native_mmvq_wave_kernel<F, NCOLS, R>(gfx906wave64 dense GEMV) was hardcoded toR = 1inwave_launch_n, reading activation blocks from L1/LDS once per single row and launching 4x more wavefronts thanR = 4or 2x more thanR = 2.
With the bit-exact kernel changes in iq_kernels.cu and native_mmvq.cu plus STRATA_EXCHANGE_ROTATE=1 and STRATA_EXP_MODE=8:
Q5_0down (native_expert_bench, Layer 0, G=16, Mode 8):T=1:107.5–128.8 us->75.1 us(240 GB/s)T=2:154.9–172.3 us->81.6 us(221 GB/s)T=4:218.8–308.2 us->94.1 us(191 GB/s, up from58–82 GB/s)
IQ4_NLdown (row_dot2_40_sub8atcn > 1, Layer 7, G=16, Mode 8):T=2:68.9 us->60.4 us(244 GB/s)T=4:84.2 us->70.1 us(210 GB/s)
IQ2_Sgate/up (Layer 8, G=16, Mode 8, 1-dp4acarry-free sign negation):T=1:158.8 us->89.1 us(189 GB/s, -43.9%)
- End-to-end throughput on MI50 32 GB (100 W cap, 131K context,
--batch 4 --vram-reserve-mib 576 --prefill 8192):- Single-stream decode (
c1, 6x512 tokens, temp 0.6, thinking on):34.5->41.59 tok/s(+20.6%) - 4-client aggregate decode (
c4, 3 rounds x 4x512 tokens):38.6->45.73 tok/s(+18.5%) - 8-client aggregate decode (
c8, 3 rounds x 8x512 tokens):38.65->48.32 tok/s(+25.0%) - Greedy code probe (
probe.py, 6x256 tokens, temp 0, thinking off):41.8->50.75 tok/s(+21.4%) - 128K needles at 50% (65,535 tokens) and 93.75% (122,862 tokens): 3/3 exact, peak VRAM 31.43–31.46 GiB (under 31.5 GiB guardrail).
- Single-stream decode (
We split the changes into three small PRs:
- #7272
[Engine] gfx906: add missing P2P hip_compat macros - #7273
[Engine] iq_kernels: sub-8 Q5_0 down, dual-row IQ4_NL down, and 1-dp4a gfx906 i-quant signs - #7274
[Engine] native_mmvq: opt-in multi-row wave64 GEMV (STRATA_MMVQ_WAVE_R) on gfx906
- Ngôn ngữ chính
- C++
- Star
- 11.6k
- Fork
- 1k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Niko1221/Strata
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Niko1221/Strata#7365 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 4 ngày
-
[GUI] Engine chip: move the breathing status dot to the right end of the quant line, inside the chipĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 4 ngày
-
[GUI] The top horizontal stroke of 更 in the sidebar footer is never drawn (Windows, 125% scaling)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Niko1221/Strata#7276 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Niko1221/Strata#7230 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của Niko1221/Strata
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`test_controlled_TermSequenceBox_logging` and `test_symbolic_ops` fail when another test runs firstĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Quantinuum/tket#2282 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
KhronosGroup/Vulkan-Tutorial#555 ·
Maintainer thường phản hồi trong vòng 10 ngày
-
Server crashes when a mob dies to poisonCó thể đã có người làm @joelstiller đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
DarkCastleMUD/DarkCastle#305 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Issue]: RAS status report lists the wrong pids for an outlier nodeCó thể đã có người làm @bhargavchintam đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 2 ngày