flashinfer.cake_causal_conv1d_nondet_train.cake_causal_conv1d_nondet_train_backward_workspace

flashinfer.cake_causal_conv1d_nondet_train.cake_causal_conv1d_nondet_train_backward_workspace(S: int, C: int, device: device, *, bwd_grid_mult: int = 1) → Tensor

Allocate a zeroed backward workspace tensor.

Parameters:
  • S (int) – Packed token count.

  • C (int) – Channel count.

  • device (torch.device) – CUDA device that will execute the kernel.

  • bwd_grid_mult (int, default=1) – Backward grid multiplier to validate for the selected backend.

Returns:

Zeroed caller-owned workspace for reuse on a single stream. Never share it between two backward launches that may run at once (e.g. two CUDA graphs replayed on different streams).

Return type:

torch.Tensor