llama.cpp/ggml/src/ggml-vulkan/vulkan-shaders
Jeff Bolz 772703c8ff
vulkan: Optimize some mat-vec mul quant shaders (#10296)
Compute two result elements per workgroup (for Q{4,5}_{0,1}). This reuses
the B loads across the rows and also reuses some addressing calculations.
This required manually partially unrolling the loop, since the compiler
is less willing to unroll outer loops.

Add bounds-checking on the last iteration of the loop. I think this was at
least partly broken before.

Optimize the Q4_K shader to vectorize most loads and reduce the number of
bit twiddling instructions.
2024-11-16 07:26:57 +01:00
..
acc.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
add.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
argsort.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
clamp.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
CMakeLists.txt ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
concat.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
contig_copy.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
copy.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
cos.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
dequant_f32.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
dequant_funcs.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
dequant_head.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
dequant_iq4_nl.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
dequant_q2_k.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
dequant_q3_k.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
dequant_q4_0.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
dequant_q4_1.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
dequant_q4_k.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
dequant_q5_0.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
dequant_q5_1.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
dequant_q5_k.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
dequant_q6_k.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
dequant_q8_0.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
diag_mask_inf.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
div.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
gelu_quick.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
gelu.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
generic_binary_head.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
generic_head.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
generic_unary_head.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
get_rows_quant.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
get_rows.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
group_norm.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
im2col.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
leaky_relu.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
mul_mat_split_k_reduce.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
mul_mat_vec_base.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
mul_mat_vec_nc.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
mul_mat_vec_p021.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
mul_mat_vec_q2_k.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
mul_mat_vec_q3_k.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
mul_mat_vec_q4_k.comp vulkan: Optimize some mat-vec mul quant shaders (#10296) 2024-11-16 07:26:57 +01:00
mul_mat_vec_q5_k.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
mul_mat_vec_q6_k.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
mul_mat_vec.comp vulkan: Optimize some mat-vec mul quant shaders (#10296) 2024-11-16 07:26:57 +01:00
mul_mm.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
mul.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
norm.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
pad.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
pool2d.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
relu.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
repeat.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
rms_norm.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
rope_head.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
rope_neox.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
rope_norm.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
scale.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
silu.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
sin.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
soft_max.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
square.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
sum_rows.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
tanh.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
timestep_embedding.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
types.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
upscale.comp ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
vulkan-shaders-gen.cpp vulkan: Optimize some mat-vec mul quant shaders (#10296) 2024-11-16 07:26:57 +01:00