fftconv1d_bhl#
- fftconv1d_bhl(x, kernel, shortcut=None)#
1D non-causal (“same”) convolution via subq_ops CUDA kernels, BHL layout
[B, H, L].Drop-in replacement for
nvsubquadratic.ops.fftconv.fftconv1d_fp32_bhl():y[l] = sum_m kernel[K // 2 + l - m] * x[m](the kernel centreK // 2is lag zero), plusshortcut * x. Unlike the torch.fft path it runs in the input dtype end to end: the dense Toeplitz-GEMMexplicit_conv1dfor bf16/fp16 inputs on compute capability 10.x at its supported sequence lengths (multiples of 128 up to 2048),fft_conv1dotherwise. Both compute the same convolution.Unlike
torch_fftit caps the length (subquadratic-ops-torch 0.3.1): withK = 2L - 1(grid_type="double"),L <= 4096on SM8x / SM12x,L <= 8192on SM90-SM11x andL <= 2048in fp64; withK ~ L(grid_type="single") the caps double. The cap followsK, so a Box window does not lift it. Compiled graphs specialise onL(on 0.3.1 one graph perfft_conv1dFFT size, e.g.L300-500 share 1024), so bucketLor usefft_backend="torch_fft"for variable-length compile.- Parameters:
- Returns:
Output tensor
[B, H, L]inx.dtype.- Raises:
ValueError – If
Lexceeds the cap above, orkerneldoes not haveHchannels.- Return type: