From 332139bd0c2703c023c11771b9ed7db2b4931ebe Mon Sep 17 00:00:00 2001 From: Kevin Boyd Date: Tue, 4 Feb 2025 14:06:59 -0800 Subject: [PATCH] Avoid shadowing python builtin in tile matmul example In docs, this was rendering a different color than expected because the interpreter picks out `sum` as a builtin. --- docs/modules/tiles.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/modules/tiles.rst b/docs/modules/tiles.rst index e26505e25..3d9cb55cd 100644 --- a/docs/modules/tiles.rst +++ b/docs/modules/tiles.rst @@ -135,7 +135,7 @@ Example: General Matrix Multiply (GEMM) # output tile index i, j = wp.tid() - sum = wp.tile_zeros(shape=(TILE_M, TILE_N), dtype=wp.float32) + tile_sum = wp.tile_zeros(shape=(TILE_M, TILE_N), dtype=wp.float32) M = A.shape[0] N = B.shape[1] @@ -148,9 +148,9 @@ Example: General Matrix Multiply (GEMM) b = wp.tile_load(B, shape=(TILE_K, TILE_N), offset=(k*TILE_K, j*TILE_N)) # sum += a*b - wp.tile_matmul(a, b, sum) + wp.tile_matmul(a, b, tile_sum) - wp.tile_store(C, sum, offset=(i*TILE_M, j*TILE_N)) + wp.tile_store(C, tile_sum, offset=(i*TILE_M, j*TILE_N))