Skip to content

Feature: Add handler for fft primitive #117

Description

@bdrhill

Description

The fft primitive is not implemented. This affects jnp.fft.fft, jnp.fft.ifft, and related FFT operations.

MWE

import jax.numpy as jnp
import asdex

def f(x):
    return jnp.fft.fft(x).real

x = jnp.array([1.0, 2.0, 3.0, 4.0])
J = asdex.jacobian(f, x, output_format="dense")(x)  # NotImplementedError

Error

NotImplementedError: No handler for primitive 'fft'.

Implementation Notes

The FFT is a linear operation with a dense Jacobian (each output depends on all inputs).
The sparsity pattern is fully dense for 1D FFT, but for multi-dimensional FFTs with axis selection,
the pattern has block structure matching the FFT axes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions