API Reference#

1D Convolution#

causal_conv1d(x, weight[, bias, activation, ...])

Depthwise causal 1D convolution with optional activation.

fft_conv1d(x, weight)

FFT Conv1d performs non-causal convolution using FFT routines.

fft_causal_conv1d(x, weight)

FFT Causal Conv1d performs convolution in a causal manner, using FFT routines instead of direct summation.

fft_causal_conv1d_packed(x, weight, ...[, ...])

Causal depthwise FFT convolution over a packed (variable-length) batch.

b2b_causal_conv1d(x, weight_proj, ...)

Back-to-back causal 1D convolution.

2D Convolution#

fft_conv2d(x, weight)

Computes 2D depthwise convolution with 'same' padding using FFT.

fused_fft_conv2d(x, weight[, fft_size])

Computes 2D depthwise convolution via the fused FFT pipeline — with a shared filter or one filter per batch element — with autograd support for both inputs: the filter spectrum kf = fused_rfft2d_fwd(weight, fft_size) is computed once per call, then y = fused_fft_conv2d_fwd(x, kf).

Filter generation#

implicit_filter(glogp, R, L)

Implicit Modal Filter: Generates filters for Long Implicit Layer used in Hyena Architecture.

Rearrange#

rearrange(x, bhl_to_lbh)

Rearrange the tensor dimensions from (batch_size, hidden_dim, seq_dim) to (seq_dim, batch_size, hidden_dim) or vice versa.