tinygrad.bend fails
raw source on the hub · import 0xe6b82fa6c4c459c7023adf4b12a3ac46/tinygrad.bend as Tinygrad
tinygrad.bend -- root of the tinygrad Bend port. Importing this file pulls in the full library; PROOF is included so no law ships open.
NOTE: eager/tinygrad/autograd.bend is NOT part of the published package yet: its recursive backward cannot typecheck under Bend's affinity rules (a tensor is consumed once, but eager backward needs each node's value both for the parent kernel and for the child dispatch). The lazy path (tensor.bend's Bwd1/Bwd2 kernels) is the supported backward for now.
5 imports
import Base import ./tinygrad/nat.bend as Nat import ./tinygrad/shape.bend as Sh import ./tinygrad/tensor.bend as T import ./PROOF.bend as Proof
The reader could not load this file (at 0xe6b82fa6c4c459c7023adf4b12a3ac46/tinygrad/tensor.bend:202). What bend.ts says:
Error:
- message : a type for this operator (write (a * b : Nat))
Location:
201 | +c = row_width(rows)
202>| fill_from_list(r*c, flat, 0n, alloc(r*c), matrix_shape(r, c))
| ^
203 |
Note: we broke this after launch, sorry. Until 2.0.16 a bare operator meant Nat.
That was a bug: operators demand annotation. Wrap the expression and it'll work again.