#18049·tinygrad

image_dot indexes a nonexistent axis for a right-hand vector

Author: noctifoldCreated Sep 8, 2026Updated Sep 8, 2026

This defect surfaced while building an A630 mock GPU.

Status: confirmed at the pinned base; separate historical red/green receipts.

Affected source

Production base: b536514c83c8b12176cbe621b8460ef8078524d2.

  • tinygrad/mixin/op.py: Git blob 6aa3d097f3a409c7bcdc523a83d1a299c492c10d.

Reproducer

bash
DEV=PYTHON IMAGE=1 FLOAT16=0 python -c "import numpy as np; from tinygrad import Tensor; print((Tensor(np.eye(5,dtype=np.float32),device='PYTHON') @ Tensor(np.arange(5,dtype=np.float32),device='PYTHON')).numpy())"

Expected versus actual

Expected: [0., 1., 2., 3., 4.] for a compatible matrix-vector product.

Observed source behavior / causal lead: The rank and contracting-axis guards accept the vector, then w.shape[-2] raises IndexError before compilation. The independent standalone repair and its ten-case FP32 qualification are described in D02_standalone_report.md. Those receipts qualify their original standalone commit, not the new emulator candidate.

Another defect in this set can surface first and mask this one; attribute an earlier failure to that defect rather than to this report.

Suggested repair and scope

Promote w to w.unsqueeze(-1), recurse with dtype forwarded, then squeeze(-1). Keep the batch-broadcast repair separate.

Location: tinygrad/mixin/op.py@1466.