From 439d033af9109f1a80187f1e8750839c1813df67 Mon Sep 17 00:00:00 2001 From: chenyu Date: Thu, 10 Jul 2025 14:47:29 -0400 Subject: [PATCH] update the README matmul example (#11167) don't call rand and numpy to show that it's indeed one kernel --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index 2968535ab0..becf7732b7 100644 --- a/README.md +++ b/README.md @@ -38,10 +38,7 @@ 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.rand(N, N), Tensor.rand(N, N); -c = (a.reshape(N, 1, N) * b.T.reshape(1, N, N)).sum(axis=2); -print((c.numpy() - (a.numpy() @ b.numpy())).mean())" +DEBUG=3 python3 -c "from tinygrad import Tensor; N = 1024; a, b = Tensor.empty(N, N), Tensor.empty(N, N); (a @ b).realize()" ``` And we can change `DEBUG` to `4` to see the generated code.