flashinfer.cake_rmsnorm_silu_gate_train.cake_rmsnorm_silu_gate_train_backward_workspace_bytes

flashinfer.cake_rmsnorm_silu_gate_train.cake_rmsnorm_silu_gate_train_backward_workspace_bytes(rows: int, device: device, *, deterministic: bool = True) → int

Bytes of the caller-owned backward workspace for rows rows (T * H) on device.

deterministic is resolved as the backward resolves it (see cake_rmsnorm_silu_gate_train_backward()), so the size fits the kernel the backward call with the same flag runs. True: the deterministic package’s FP32 partial buffer, which grows with rows (flashinfer.cake_rmsnorm_silu_gate_det_train.cake_rmsnorm_silu_gate_det_train_backward_workspace_bytes()). False: the FP64 weight-gradient accumulators and the 8-byte word of the arrival ticket and the claim counter, a few KiB whatever rows.

Parameters:
  • rows (int) – Number of rows of the backward call, T * H.

  • device (torch.device) – The CUDA device the backward runs on.

  • deterministic (bool) – The deterministic flag of the backward call the workspace is for.

Returns:

The workspace size in bytes.

Return type:

int