tensor_gelu.bend source
tensor_gelu.bend on the hub · documented module
# The compensated GELU mapper, with one scalar tail and two eight-lane stages.import Baseimport ./math_gelu_lanes.bend as Geluimport ./traversal_lanes.bend as Lanesimport ./storage_buffer.bend as Storageimport ./proofs/storage_certificate.bend as Certificateimport ./proofs/math_gelu_lanes_certificate.bend as GeluCertificatedef mapped(+count: Nat,+position: U32,buffer: Storage.Buffer<F32>) -> Storage.Buffer<F32>: Storage.Buffer{values,length,Certificate.Certificate{+depth,equation}} = buffer Storage.Buffer{Gelu.map_when(Lanes.covered(depth,position,count),count,position,values),length, GeluCertificate.map_when(Lanes.covered(depth,position,count),count,position,values,Certificate.Certificate{depth,equation})}