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/omega-mv/blob/main/gpu/nvidia/om/apiviews/gdnch.om # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / gpu / nvidia / om / apiviews / gdnch.om` 14 lines ยท 472 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note qkv channel of value head h, slot s. Head dim 128, key heads 16. 3 note hk = h / (vh / 16). q is hk*128+s, k is 2048+hk*128+(s-128), v is 4 note 4096+h*128+(s-256). The caller keeps the slot loop and the loads. 5 fn av_gdnch h ulong s ulong vh ulong to ulong 6 hk = div h div vh 16 7 if lt s 128 8 ret add mul hk 128 s 9 end 10 if lt s 256 11 ret add 2048 add mul hk 128 sub s 128 12 end 13 ret add 4096 add mul h 128 sub s 256 14 end