flashinfer.cake_mhc_nondet_train.cake_mhc_nondet_train_finish¶
- flashinfer.cake_mhc_nondet_train.cake_mhc_nondet_train_finish(X: Tensor, B: Tensor, handle) Tensor¶
Autograd-enabled
forward_finish:YfromX, the branch outputBand the preparehandle.The arguments and output are those of
cake_mhc_det_train_finish();handleis the handlecake_mhc_nondet_train_prepare()returned (any other handle, such as acake_mhc_det_train_prepareone, raisesTypeError).- Parameters:
X (torch.Tensor) – The BF16
[T, 4, H]tensor passed tocake_mhc_nondet_train_prepare().B (torch.Tensor) – BF16
[T, H]output of the external branch applied toU(may require gradients).handle (object) – The handle returned by
cake_mhc_nondet_train_prepare(), for one finish.
- Returns:
BF16
Yof shape[T, 4, H].- Return type:
torch.Tensor