interplane.Get Omega
Read in your language

omega-bridge

Omega-first language interoperability: checked conversion backends and native language bindings

Brought by drakestapleton

branch main Branches Tags History

omega-bridge / pytorch / kernels / tr.om

9 lines · 279 bytes Raw Blame History
1note tr: o[C,R] = x[R,C] transposed (aten.permute with dims [1,0]) into a new row-major array.
2note The caller supplies const lines R C RC before this text.
3fn tr x view f32 RC o edit f32 RC to void
4for i ulong R
5for j ulong C
6put o add mul j R i get x add mul i C j
7end
8end
9end