---
title: "causalConvUpdate"
sidebar_label: "causalConvUpdate"
description: "Kotlin binding reference: causalConvUpdate."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Ops](index.md)/[causalConvUpdate](causalConvUpdate.md)

# causalConvUpdate

[common]\
fun [causalConvUpdate](causalConvUpdate.md)(input: [Tensor](../Tensor/index.md), weight: [Tensor](../Tensor/index.md), bias: [Tensor](../Tensor/index.md)?, state: [Tensor](../Tensor/index.md), seqLens: [Tensor](../Tensor/index.md)? = null, slotIds: [Tensor](../Tensor/index.md)? = null, activation: [Activation](../Activation/index.md)? = null): [Tensor](../Tensor/index.md)

`causalConvUpdate(input: Tensor, weight: Tensor, bias: Tensor?, state: Tensor, seqLens: Tensor? = null, slotIds: Tensor? = null, activation: Activation? = null)`: the `causal_conv_update` operator. Depthwise causal short-conv serving step over a rolling per-sequence window. `x [B, S, dim]`; `weight [dim, W]` (oldest tap first); optional `bias [dim]`; `state [B, dim, W]` (same dtype as x) is read AND updated IN PLACE in both modes: S 1 runs the prefill conv with each row's left context seeded from its window (a zero window is a fresh sequence, bit for bit; an S-token call over committed state equals S single-token steps exactly) and re-captures the window as the last W of (old window ++ the row's valid inputs; zero valid tokens leave it unchanged); S == 1 shift-inserts the new token and emits the tap dot. `seq_lens` (`[B]` Int32) bounds ragged prefill rows (their padding is zero post-activation). `activation` applies to the returned `out [B, S, dim]` only (Silu fuses in-kernel); the stored window stays pre-activation raw. `slot_ids` (`[B]` Int32, device-resident) addresses `state` as a SLAB `[num_slots, dim, W]`: batch row `b` reads/updates slab row `slot_ids[b]` in place (ids in range and DISTINCT per call, the caller's contract); absent keeps state row `b`.