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-webgpu/wgsl-shaders/arange.wgsl # 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-webgpu / wgsl-shaders / arange.wgsl` 22 lines ยท 513 bytes Raw Blame History 1 @group(0) @binding(0) 2 var dst: array; 3 4 struct Params { 5 ne: u32, 6 offset_dst: u32, 7 start: f32, 8 step: f32, 9 }; 10 11 @group(0) @binding(1) 12 var params: Params; 13 14 @compute @workgroup_size(WG_SIZE) 15 fn main(@builtin(num_workgroups) num_wg: vec3, @builtin(global_invocation_id) gid: vec3) { 16 let i = gid.x + (num_wg.x * u32(WG_SIZE)) * gid.y; 17 if (i >= params.ne) { 18 return; 19 } 20 21 dst[params.offset_dst + i] = params.start + params.step * f32(i); 22 }