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
rowsrows (T * H) ondevice.deterministicis resolved as the backward resolves it (seecake_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 withrows(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 whateverrows.- 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
deterministicflag of the backward call the workspace is for.
- Returns:
The workspace size in bytes.
- Return type:
int