mixed_fftconv1d_fp32_bhl_w_reshape#
- mixed_fftconv1d_fp32_bhl_w_reshape(
- x,
- kernel,
- periodic,
- shortcut=None,
- use_phase_shift=True,
1D mixed-BC FFT conv wrapper for BLH layout (batch, length, hidden).
Reshapes BLH ↔ BHL around
mixed_fftconv1d_fp32_bhl(). Prefer this wrapper over operating in BLH natively — internally the FFT runs on contiguous spatial axes (BHL), so the reshape cost is negligible compared to the FFT itself.- Parameters:
x (Tensor) – Input tensor of shape
[B, L, H](BLH, channels-last).kernel (Tensor) – Kernel tensor of shape
[1|B, K, H](BLH). Leading dim 1 for a shared kernel,Bfor per-sample kernels.shortcut (Tensor | None) – Optional per-channel scale
[H].use_phase_shift (bool) – See
mixed_fftconv1d_fp32_bhl().
- Returns:
Tensor of shape
[B, L, H]in the original dtype ofx.- Return type: