For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
causal_conv1d
def causal_conv1d[dtype: DType, //](output: MutTileTensor[dtype, Engine=output.Engine, linear_idx_type=output.linear_idx_type], input: ImmTileTensor[dtype, Engine=input.Engine, linear_idx_type=input.linear_idx_type], weight: ImmTileTensor[dtype, Engine=weight.Engine, linear_idx_type=weight.linear_idx_type], bias: ImmTileTensor[dtype, Engine=bias.Engine, linear_idx_type=bias.linear_idx_type], silu_activation: Bool, ctx: DeviceContext)
Runs the causal_conv1d op on (batch, channels, seqlen) views.
Parameters:
- dtype (
DType): Element type of every tensor.
Args:
- output (
MutTileTensor[dtype, Engine=output.Engine, linear_idx_type=output.linear_idx_type]): Output view with the shape ofinput. - input (
ImmTileTensor[dtype, Engine=input.Engine, linear_idx_type=input.linear_idx_type]): Input view. - weight (
ImmTileTensor[dtype, Engine=weight.Engine, linear_idx_type=weight.linear_idx_type]): Weights with shape(channels, width). - bias (
ImmTileTensor[dtype, Engine=bias.Engine, linear_idx_type=bias.linear_idx_type]): Per-channel bias with shape(channels,). - silu_activation (
Bool): Whether to apply SiLU after the convolution. - ctx (
DeviceContext): Device context to run on.