KernelBandPlanning.dense_baseline: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/kernel_band_planning.bend as KernelBandPlanning Lines 112-120 of stelliferous@0.0.2.0/kernel_band_planning.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/kernel_band_planning.bend&start_line=112&end_line=120 import Base import stelliferous@0.0.2.0/kernel_cost.bend as Cost import stelliferous@0.0.2.0/kernel_planning.bend as KernelPlanning import stelliferous@0.0.2.0/tensor_band.bend as Bands import stelliferous@0.0.2.0/tensor_band_window.bend as BandWindow import stelliferous@0.0.2.0/kernel_window.bend as KernelWindow def dense_baseline(+work: KernelPlanning.Work,window: BandWindow.Geometry,+config: Cost.Configuration) -> F32: match work window config: case KernelPlanning.Work{+positions,inner,+rows,owners,geometry,activation} BandWindow.Geometry{Bands.Geometry{+batch,channels,height,width},kernel,stride,padding,oh,ow} Cost.Configuration{mac,+byte_ns,operation_ns,grain,wake}: +one = KernelPlanning.estimate(0,work,config,KernelPlanning.movement(0n,0,KernelWindow.padded(positions),KernelPlanning.root_rows(work),work,config),1) +output_size = (rows * positions : U32) +images = U32.to_f32(batch) Bool.pick(F32,U32.is_le(batch,1),one, (reorder_cost(work,config) + images * (one - reorder_cost(work,config) + transfer((channels * height * width : U32),byte_ns) + U32.to_f32(output_size) * 4.0 * byte_ns) + KernelPlanning.payload_float(Nat.mul(4n,KernelPlanning.capacity((batch * output_size : U32)))) * byte_ns + (images - 1.0) * clone_cost(work,config) : F32)) Uses (23): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_f32 https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_band_planning.bend&name=clone_cost https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_band_planning.bend&name=reorder_cost https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_band_planning.bend&name=transfer https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_cost.bend&name=Configuration https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_planning.bend&name=Work https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_planning.bend&name=capacity https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_planning.bend&name=estimate https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_planning.bend&name=movement https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_planning.bend&name=payload_float https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_planning.bend&name=root_rows https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_window.bend&name=padded https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band.bend&name=Geometry https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band_window.bend&name=Geometry