IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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 struct

CausalConv1DVarlenFwdRows

struct CausalConv1DVarlenFwdRows[activation: StaticString, channels_last: Bool = False, use_residual: Bool = False]

causal_conv1d_varlen_fwd in a mixed verify graph.

The verify width K is the length of verify_width, whose contents are never read. A row longer than K + 1 tokens is a prefill row: it writes its state window ending at its last real token whatever update_state says; the flag keeps its meaning for shorter rows. A launch with no prefill row runs main's convolution.

Tensor Shapes: As causal_conv1d_varlen_fwd, plus - verify_width : [K] int64

Parameters​

  • ​activation (StaticString): Activation function - "none" or "silu".
  • ​channels_last (Bool): If True, x and output are tokens-major (total_seqlen, dim) instead of (dim, total_seqlen).
  • ​use_residual (Bool): If True, adds x[d, s] to the convolution sum at each output position, before activation.

Implemented traits​

AnyType, Deinitable, Movable

Methods​

execute​

static def execute(output: T, x: T, weight: T, bias: T, conv_states: T, query_start_loc: T, cache_indices: T, has_initial_state: T, update_state: T, verify_width: T, ctx: DeviceContext)

Was this page helpful?