mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-09 23:18:04 -05:00
`UOp.render()` crashed with `IndexError: tuple index out of range` when the UOp graph contained a `VECTORIZE` with empty `src=()`. This occurs when reshaping to scalar shape `()`, e.g., `Tensor.ones(4).sum()`. The bug was in the renderer's VECTORIZE pattern: `all_same(())` returns `True` (vacuous truth), causing the code to access `x.src[0]` on an empty tuple. - Fix `IndexError` when calling `UOp.render()` on graphs containing empty `VECTORIZE` nodes. - Add test for empty `VECTORIZE` rendering.
31 KiB
31 KiB