BendtorchFast.ew_d2: def of bendtorch-fast@1.3.0.0 Import: import bendtorch-fast@1.3.0.0/main.bend as BendtorchFast Lines 29-38 of bendtorch-fast@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-fast@1.3.0.0/main.bend&start_line=29&end_line=38 import Base import bend-ml-tensor-fork@0.1.5.0/main.bend as TF # log2 of the blocks for cnt numbers: one block below 131072 (MNIST's and the tiny Llama's matrices; at 100352 the # blocks cost MNIST more than they gave on 16 threads), else one per 16384, at most 64 def ew_d2(small: Bool, big: Bool, +cnt: Nat) -> Nat: match small big: case True{} _: 0n case False{} True{}: 6n case False{} False{}: TF.depth(Nat.div(cnt, 16384n)) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.div https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor-fork@0.1.6.0/main.bend&name=depth