KernelBandPipeline.windowed: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/kernel_band_pipeline.bend as KernelBandPipeline Lines 18-30 of stelliferous@0.0.2.0/kernel_band_pipeline.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/kernel_band_pipeline.bend&start_line=18&end_line=30 import Base 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 import stelliferous@0.0.2.0/kernel_pipeline.bend as Pipeline import stelliferous@0.0.2.0/kernel_tile.bend as Tile import stelliferous@0.0.2.0/storage_buffer.bend as Storage import stelliferous@0.0.2.0/traversal_partition.bend as Partition import stelliferous@0.0.2.0/math_activation.bend as Activations # A leaf assembles the rows its outputs read into one contiguous window whose # first row is a stride multiple, then runs the dense leaf on it: packing a # window is packing a shorter image with output rows shifted by first / stride. def windowed(~custom: F32 -> F32,activation: Activations.Activation,+geometry: BandWindow.Geometry,+channels: U32,+inner: U32,+first: U32,+rows: U32,+rows_read: BandWindow.RowWindow, core: Storage.Buffer,above: Storage.Buffer,below: Storage.Buffer,weights: Storage.Buffer,bias: Storage.Buffer) -> Bands.Bands(~F32): BandWindow.Geometry{Bands.Geometry{batch,+ci,+height,+width},+kernel,+stride,+padding,+output_height,+output_width} = geometry BandWindow.RowWindow{BandWindow.Rows{+output_first,+output_rows},+above_range,+below_range,+window} = rows_read BandWindow.Rows{+window_first,+window_rows} = window +positions = (output_rows * output_width : U32) Partition.Leaf{Pipeline.blocked(~custom,activation, Pipeline.Work{channels,window_rows,width,kernel,stride,padding,output_width,positions,inner}, KernelWindow.start(((output_first - first / height * output_height) * output_width : U32),stride,output_width,(window_first - first / height * height : U32)), BandWindow.assemble(~F32,0.0,BandWindow.input_geometry(geometry),window,BandWindow.Rows{first,rows},above_range,below_range,core,above,below),weights,bias),output_first,output_rows,Unit{}} Uses (20): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.div 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.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_pipeline.bend&name=Work https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_pipeline.bend&name=blocked https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_tile.bend&name=Tile8 https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_window.bend&name=start https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/math_activation.bend&name=Activation https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/storage_buffer.bend&name=Buffer https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band.bend&name=Bands 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 https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band_window.bend&name=RowWindow https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band_window.bend&name=Rows https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band_window.bend&name=assemble https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band_window.bend&name=input_geometry https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/traversal_partition.bend&name=Tree