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/MojoLlama/blob/main/src/mojollama/kernels/mojo_tensor_test.mojo # MojoLlama Archived Mojo/MAX quantizer and serving research repository (read-only history) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `MojoLlama / src / mojollama / kernels / mojo_tensor_test.mojo` 17 lines ยท 434 bytes Raw Blame History 1 from std.prelude import * 2 3 fn main(): 4 # Try tensor types 5 var t = Tensor[Float32](10) 6 for i in range(10): 7 t[i] = Float32(i * 2) 8 print("Tensor[0]: ", t[0]) 9 print("Tensor[5]: ", t[5]) 10 print("Tensor shape: ", t.shape()) 11 12 # Check if SIMD pointer exists 13 var v = SIMD[DType.float32, 4](3.14) 14 print("SIMD: ", v[0]) 15 16 # Try C-ABI compatible pointer (needed for @extern) 17 print("Done")