Skip to content

FFT Operators

Every op on this page is used the same way: construct it once, then call it. The constructor takes what the kernel is compiled with; the call takes the tensors. Both are documented under each op — __init__ and forward, where forward is what runs when you call op(...).

Complex-to-complex

tileops.ops.fft.FFTC2CFwdOp

1D Complex-to-Complex Fast Fourier Transform operation.

Computes the one-dimensional discrete Fourier transform of complex input. This is equivalent to torch.fft.fft.

Supports batched input: any leading dimensions are flattened into a single batch dimension, processed in parallel by the kernel, and reshaped back.

Uses pre-computed twiddle factor LUT and shared-memory butterfly fusion for optimal GPU performance.

__init__

__init__(
    tune=False,
    kernel_map=None,
)

Build the op. Shapes and dtype are taken from the first call.

Parameters:

  • tune (bool, default: False ) –

    Whether to enable autotuning (default: False)

  • kernel_map (Optional[Dict[str, Kernel]], default: None ) –

    Optional custom kernel mapping for testing

forward

forward(
    input,
)

Compute 1D FFT of complex input.

Parameters:

  • input (Tensor) –

    Input tensor of shape (..., n) with complex dtype.

Returns:

  • Tensor

    Output tensor of same shape as input with FFT applied along the

  • Tensor

    last dimension.