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 function

causal_conv1d_update_gpu_functional

def causal_conv1d_update_gpu_functional[x_dtype: DType, conv_state_dtype: DType, weight_dtype: DType, output_dtype: DType, bias_dtype: DType, kNThreads: Int, x_LT: TensorLayout, conv_state_LT: TensorLayout, weight_LT: TensorLayout, output_LT: TensorLayout, bias_LT: TensorLayout, x_engine: TensorEngine, conv_state_engine: TensorEngine, weight_engine: TensorEngine, output_engine: TensorEngine, bias_engine: TensorEngine, conv_state_in_LT: TensorLayout, conv_state_in_engine: TensorEngine](batch: Int32, dim: Int32, seqlen: Int32, width: Int32, state_len: Int32, x: TileTensor[x_dtype, x_LT, ImmUntrackedOrigin, Engine=x_engine], conv_state: TileTensor[conv_state_dtype, conv_state_LT, MutUntrackedOrigin, Engine=conv_state_engine], conv_state_in: TileTensor[conv_state_dtype, conv_state_in_LT, ImmUntrackedOrigin, Engine=conv_state_in_engine], weight: TileTensor[weight_dtype, weight_LT, ImmUntrackedOrigin, Engine=weight_engine], output: TileTensor[output_dtype, output_LT, MutUntrackedOrigin, Engine=output_engine], bias: TileTensor[bias_dtype, bias_LT, ImmUntrackedOrigin, Engine=bias_engine], silu_activation: Int8)

Reads the previous state separately while writing the complete next state.

Uses the original scalar channel-per-thread update and arithmetic. Identical input/output state views may alias: convolution finishes before state writes, and the ascending shift only reads the current or a later state position. State input loads are non-invariant because the output may alias them. Distinct state layouts are supported when the allocations do not overlap. Partially overlapping state views or aliases with different layouts are unsupported.

Was this page helpful?