def check_span
import bend-ml-llama@0.2.1.0/main.bend as BendMlLlamaimport Base
1553# stops the program unless tensor t, n BF16 numbers from byte hi * 2^32 + lo, ends inside the file with hi = 0
1554def check_span(+path: String, +hi: U32, +lo: U32, +n: Nat, +t: Nat) -> IO(Unit):
1555 do IO<Unit>:
1556 f : File <- IO.try(File, File.open(path, "r"))
1557 m : File & Result<&1, &1, U32 & String, U32> <- File.size(f)
1558 span_ok(m, hi, lo, (lo + U32.from_nat(Nat.mul(n, 2n)) : U32), path, t)