From 7e8f5dde74318952e2a63f4da78259f640da87ae Mon Sep 17 00:00:00 2001 From: George Hotz <72895+geohot@users.noreply.github.com> Date: Mon, 21 Jul 2025 11:14:57 -0700 Subject: [PATCH] matmul style is still reshape (#11308) --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index becf7732b7..274f5000e5 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,9 @@ tinygrad can run [LLaMA](/docs/showcase.md#llama) and [Stable Diffusion](/docs/s Try a matmul. See how, despite the style, it is fused into one kernel with the power of laziness. ```sh -DEBUG=3 python3 -c "from tinygrad import Tensor; N = 1024; a, b = Tensor.empty(N, N), Tensor.empty(N, N); (a @ b).realize()" +DEBUG=3 python3 -c "from tinygrad import Tensor; +N = 1024; a, b = Tensor.empty(N, N), Tensor.empty(N, N); +(a.reshape(N, 1, N) * b.T.reshape(1, N, N)).sum(axis=2).realize()" ``` And we can change `DEBUG` to `4` to see the generated code.