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-vulkan/vulkan-shaders/div.comp # 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-vulkan / vulkan-shaders / div.comp` 27 lines ยท 776 bytes Raw Blame History 1 #version 450 2 3 #include "types.glsl" 4 #include "generic_binary_head.glsl" 5 6 const uint num_threads = 256; 7 8 layout(local_size_x = num_threads, local_size_y = 1, local_size_z = 1) in; 9 10 void main() { 11 uint idx = get_idx(); 12 13 // num_threads * num_iter must equal 512, to match the wg_denoms and get_idx calculation 14 const uint num_iter = 2; 15 16 [[unroll]] for (uint i = 0; i < num_iter; ++i) { 17 if (idx >= p.ne) { 18 continue; 19 } 20 uint i00, i01, i02, i03; 21 get_indices(idx, i00, i01, i02, i03); 22 23 data_d[get_doffset() + dst_idx(i00, i01, i02, i03)] = D_TYPE(FLOAT_TYPE(data_a[get_aoffset() + src0_idx(i00, i01, i02, i03)]) / FLOAT_TYPE(data_b[get_boffset() + src1_idx(i00, i01, i02, i03)])); 24 25 idx += num_threads; 26 } 27 }