Archived
merge 1.12.0: gemma4 E2B/E4B and Nemotron Bolt E4B arrive; the ref2va audio, rows and ABI work carried across
conv1d keeps both stride forms: upstream's causal codec downsample with cu_div (Fish Audio) and the port's explicit-pad non-causal one (the H3 audio encoder's), in libref, libavx and libr4d alike; the ABI takes upstream's 27 on top of the port's RadVideoGenBatch growth.
This commit is contained in:
commit
7c3b5ab7d5
285 files changed
+30500
-2898
No files matched your search
+38
-1
@@ -31,6 +31,9 @@ enum {
|
||||
* outrank prefill. */
|
||||
R4D_PRIO_ATTN_DECODE = 70,
|
||||
R4D_PRIO_ATTN_PREFILL = 60,
|
||||
/* A lossy prefill row (e4m3 products) matches only a caller that states `prefill_fp8`, where
|
||||
* the exact row matches too, so it ranks above it and below decode. */
|
||||
R4D_PRIO_ATTN_PREFILL_FP8 = 61,
|
||||
/* The windowed kernels (r4d_attn_paged_window.hip) serve every q_len, so where their geometry
|
||||
* meets another leg's (h256 at gqa 2) they match in both of that leg's bands and rank below
|
||||
* both: on R9700 at the 31B's shapes (window 1024, fp8 cache) the h256/gqa2 decode kernel takes
|
||||
@@ -46,6 +49,11 @@ enum {
|
||||
R4D_PRIO_GEMM_SKINNY = 50,
|
||||
/* The MXFP4 decode row outranks the MXFP4 skinny row, whose band it shares up to N = 36864. */
|
||||
R4D_PRIO_GEMM_MXDEC = 55,
|
||||
/* The MXFP4 gemv row (one to eight rows) outranks the decode row, whose band it shares there. */
|
||||
R4D_PRIO_GEMM_MXGEMV = 58,
|
||||
/* The decode kernel's short-K row outranks gemv_wide in the one corner of its band where the
|
||||
* decode kernel is faster (33..64 rows, N >= 8192, K <= 2560). */
|
||||
R4D_PRIO_GEMM_MXDEC_SHORTK = 59,
|
||||
/* The skinny m64 row has no upper bound on M, so the tiled bf16 row (M > 64 only) must outrank
|
||||
* it, and stays below m16, whose band it never enters. */
|
||||
R4D_PRIO_GEMM_BF16_TILED = 55,
|
||||
@@ -92,13 +100,22 @@ extern "C" {
|
||||
|
||||
/* -- attention (r4d_attn_*.hip) -- */
|
||||
int r4d_rad_attn_prefill_h256_fp8 (const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_prefill_h256_fp8_qk8(const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_prefill_h256_fp8_pv8(const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_prefill_h256_fp8_qk8pv8(const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_prefill_h256_bf16(const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_decode_h256_fp8 (const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_decode_h256_fp8v4(const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_prefill_h256_fp8v4(const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_prefill_h256_fp8v4_qk8(const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_prefill_h256_fp8v4_pv8(const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_prefill_h256_fp8v4_qk8pv8(const RadArgs*, RadStream);
|
||||
int64_t r4d_rad_attn_decode_h256_v4_scratch(const RadArgs*);
|
||||
int r4d_rad_attn_decode_h256_k6v4(const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_prefill_h256_k6v4(const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_prefill_h256_k6v4_qk8(const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_prefill_h256_k6v4_pv8(const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_prefill_h256_k6v4_qk8pv8(const RadArgs*, RadStream);
|
||||
int64_t r4d_rad_attn_decode_h256_k6_scratch(const RadArgs*);
|
||||
int r4d_rad_attn_decode_h256_bf16 (const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_decode_h128_fp8 (const RadArgs*, RadStream);
|
||||
@@ -131,6 +148,8 @@ int64_t r4d_rad_attn_qrow_h128_gqa8_scratch(const RadArgs*);
|
||||
/* Paged attention at head_dim 256 and 512, 1/2/4/8 queries per KV head, any window, causal or not
|
||||
* (r4d_attn_paged_window.hip): one entry point per geometry and cache dtype, every q_len and any q
|
||||
* row pitch, so they serve both attn_paged and attn_paged_qrow. */
|
||||
int r4d_rad_attn_window_h128_gqa1_bf16(const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_window_h128_gqa1_fp8 (const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_window_h256_gqa1_bf16(const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_window_h256_gqa1_fp8 (const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_window_h256_gqa2_bf16(const RadArgs*, RadStream);
|
||||
@@ -147,6 +166,7 @@ int r4d_rad_attn_window_h512_gqa4_bf16(const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_window_h512_gqa4_fp8 (const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_window_h512_gqa8_bf16(const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_window_h512_gqa8_fp8 (const RadArgs*, RadStream);
|
||||
int64_t r4d_rad_attn_window_h128_scratch(const RadArgs*);
|
||||
int64_t r4d_rad_attn_window_h256_scratch(const RadArgs*);
|
||||
int64_t r4d_rad_attn_window_h512_scratch(const RadArgs*);
|
||||
/* The top-1 of a row of all-gathered (id, value) pairs, written one id a row: the vocab-sharded
|
||||
@@ -170,6 +190,9 @@ int r4d_rad_lora_expand_tiled (const RadArgs*, RadStream);
|
||||
int r4d_rad_lora_expand_mm (const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_vit (const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_dense (const RadArgs*, RadStream);
|
||||
/* Unlimited-OCR's SAM tower: windowed tiles with decomposed relative position
|
||||
* (r4d_sam_attn_bf16.hip). */
|
||||
int r4d_rad_sam_attn (const RadArgs*, RadStream);
|
||||
int r4d_rad_seg_sinusoid (const RadArgs*, RadStream);
|
||||
/* The image generator's attention (r4d_attn_gen.hip): a paged prefix and the pass's own rows, the
|
||||
* causal-capable dense form at head_dim 128 (a text encoder's prompt), and one 1152-wide head
|
||||
@@ -211,8 +234,10 @@ int r4d_rad_conv_t1d_f32 (const RadArgs*, RadStream);
|
||||
int r4d_rad_snake (const RadArgs*, RadStream);
|
||||
int r4d_rad_cfg_topk_sample (const RadArgs*, RadStream);
|
||||
int r4d_rad_rvq_embed (const RadArgs*, RadStream);
|
||||
int r4d_rad_vq_encode (const RadArgs*, RadStream);
|
||||
int r4d_rad_frame_mix_store (const RadArgs*, RadStream);
|
||||
int r4d_rad_end_status (const RadArgs*, RadStream);
|
||||
int r4d_rad_ras_pick (const RadArgs*, RadStream);
|
||||
int r4d_rad_frame_store (const RadArgs*, RadStream);
|
||||
int r4d_rad_resample_nearest (const RadArgs*, RadStream);
|
||||
int r4d_rad_fourier_embed (const RadArgs*, RadStream);
|
||||
@@ -225,6 +250,7 @@ int r4d_rad_attn_dense_small_h256 (const RadArgs*, RadStream);
|
||||
int r4d_rad_iota (const RadArgs*, RadStream);
|
||||
int r4d_rad_cu_repeat (const RadArgs*, RadStream);
|
||||
int r4d_rad_int_affine (const RadArgs*, RadStream);
|
||||
int r4d_rad_sub_i32 (const RadArgs*, RadStream);
|
||||
/* r4d_video.hip */
|
||||
int r4d_rad_rms_mod (const RadArgs*, RadStream);
|
||||
int r4d_rad_rms_mod_quant_fp8 (const RadArgs*, RadStream);
|
||||
@@ -251,7 +277,6 @@ int r4d_rad_pixel_norm (const RadArgs*, RadStream);
|
||||
int r4d_rad_d2s3d (const RadArgs*, RadStream);
|
||||
int r4d_rad_s2d3d (const RadArgs*, RadStream);
|
||||
int r4d_rad_pix_patch (const RadArgs*, RadStream);
|
||||
int r4d_rad_patch_pix8 (const RadArgs*, RadStream);
|
||||
int r4d_rad_vol_index (const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_na3d (const RadArgs*, RadStream);
|
||||
int r4d_rad_tile_grid (const RadArgs*, RadStream);
|
||||
@@ -279,6 +304,13 @@ int r4d_rad_attn_prefill_h128_gqa8_bf16(const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_decode_h128_gqa8_fp8 (const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_decode_h128_gqa8_bf16 (const RadArgs*, RadStream);
|
||||
int64_t r4d_rad_attn_decode_h128_gqa8_scratch(const RadArgs*);
|
||||
/* ONE query a KV head, head_dim 128 -- plain MHA, the Unlimited-OCR decoder (10 over 10). Both
|
||||
* legs from the generic body instantiated at ratio 1 (r4d_attn_paged_h128_gqa1.hip). */
|
||||
int r4d_rad_attn_prefill_h128_gqa1_fp8 (const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_prefill_h128_gqa1_bf16(const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_decode_h128_gqa1_fp8 (const RadArgs*, RadStream);
|
||||
int r4d_rad_attn_decode_h128_gqa1_bf16 (const RadArgs*, RadStream);
|
||||
int64_t r4d_rad_attn_decode_h128_gqa1_scratch(const RadArgs*);
|
||||
/* Four queries per KV head, head_dim 256 only (Qwen3.5-0.8B); same body, another instantiation
|
||||
* (r4d_attn_paged_h256_gqa4.hip). */
|
||||
int r4d_rad_attn_prefill_h256_gqa4_fp8 (const RadArgs*, RadStream);
|
||||
@@ -428,6 +460,7 @@ int r4d_rad_gemm_mxfp4a8_tiled(const RadArgs*, RadStream);
|
||||
int64_t r4d_rad_gemm_mxfp4a8_tiled_scratch(const RadArgs*);
|
||||
int r4d_rad_gemm_mxfp4a8_decode(const RadArgs*, RadStream);
|
||||
int64_t r4d_rad_gemm_mxfp4a8_decode_scratch(const RadArgs*);
|
||||
int r4d_rad_gemm_mxfp4a8_gemv(const RadArgs*, RadStream);
|
||||
int r4d_rad_dequant_w4 (const RadArgs*, RadStream);
|
||||
int r4d_rad_rowtopk (const RadArgs*, RadStream);
|
||||
int64_t r4d_rad_rowtopk_scratch(const RadArgs*);
|
||||
@@ -701,6 +734,7 @@ int r4d_rad_mla_attn(const RadArgs*, RadStream);
|
||||
int64_t r4d_rad_mla_attn_scratch(const RadArgs*);
|
||||
int r4d_rad_mla_attn_matrix(const RadArgs*, RadStream);
|
||||
int64_t r4d_rad_mla_attn_matrix_scratch(const RadArgs*);
|
||||
int r4d_rad_mla_attn_rows(const RadArgs*, RadStream);
|
||||
int r4d_shape_mla_attn(const RadParam*, int, int, RadOpdDesc*);
|
||||
int r4d_rad_router_sigmoid_topk(const RadArgs*, RadStream);
|
||||
int r4d_shape_router_sigmoid_topk(const RadParam*, int, int, RadOpdDesc*);
|
||||
@@ -733,6 +767,9 @@ int r4d_rad_logits_gemm_cols(const RadArgs*, RadStream);
|
||||
* fused one lacks. */
|
||||
int r4d_rad_sample_penalties (const RadArgs*, RadStream);
|
||||
int r4d_rad_sample_dry (const RadArgs*, RadStream);
|
||||
/* The windowed no-repeat-ngram ban (r4d_sample_ngram_f32.hip): the row's history, one -infinity
|
||||
* a banned column. */
|
||||
int r4d_rad_sample_ngram_ban(const RadArgs*, RadStream);
|
||||
int r4d_rad_sample_temp (const RadArgs*, RadStream);
|
||||
int r4d_rad_sample_mask (const RadArgs*, RadStream);
|
||||
int r4d_rad_sample_topk (const RadArgs*, RadStream);
|
||||
|
||||
Reference in new issue
Block a user