def depth_sel

bend-ml-llama@0.2.1.0 · main.bend:1458

import bend-ml-llama@0.2.1.0/main.bend as BendMlLlama
import Base
import bend-ml-tensor-array@0.1.19.0/main.bend as TA

1458# the weight matrices are kept in 2^d row bands (TA.Bands); each matrix · vector product runs its bands in
1459# parallel without copying the weights (bend-ml NOTES exp. 11). With 2 threads or fewer the bands cannot help,
1460# so d = 0: a single band, which computes what the sequential Mat.matmul_nt computes (bend-ml exp. 14).
1461def depth_sel(few: Bool) -> Nat:
1462  match few:
1463    case True{}:
1464      0n
1465    case False{}:
1466      4n

Uses (2)

Used by (1)