Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/ggml/blob/master/src/ggml-opencl/kernels/mul_mat_id_utils.cl # ggml [Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `ggml / src / ggml-opencl / kernels / mul_mat_id_utils.cl` 22 lines ยท 609 bytes Raw Blame History 1 kernel void kernel_moe_zero_dst( 2 global const char * ids, 3 ulong offset_ids, 4 ulong nb_ids1, 5 global char * dst, 6 ulong offset_dst, 7 ulong nb1, 8 ulong nb2, 9 int ne0 10 ) { 11 const size_t i1 = get_group_id(0); 12 const size_t i2 = get_group_id(1); 13 const int expert = *((global const int *)(ids + offset_ids + i1*sizeof(int) + i2*nb_ids1)); 14 if (expert != -1) { 15 return; 16 } 17 18 global float * row = (global float *)(dst + offset_dst + i1*nb1 + i2*nb2); 19 for (size_t i0 = get_local_id(2); i0 < (size_t)ne0; i0 += get_local_size(2)) { 20 row[i0] = 0.0f; 21 } 22 }