TorchLean API

NN.Runtime.Autograd.Torch.Core.Ops.Spectral

Native hooks for Fourier transforms and diagonal scans #

CPU execution declines these hooks before recording anything, allowing the generic differentiable program to run on its ordinary operations. CUDA execution validates reference identities, selects the corresponding backend capsule, and records a native node. This keeps provider selection and cross-session checks on the same path as the other eager operations.

Run a native tape constructor only for a CUDA session, preserving its reference identity.

Instances For
    def Runtime.Autograd.Torch.Internal.EagerSession.rfft1dNative? {α : Type} [TorchLean.Storage α] (s : EagerSession α) {batch n : } (x : TensorRef α [batch, n]) :
    IO (Option (TensorRef α [batch, n / 2 + 1, 2]))

    Native real-transform hook; CPU interpreters use the generic matrix reference.

    Instances For

      Native normalized inverse hook with explicit output length.

      Instances For
        def Runtime.Autograd.Torch.Internal.EagerSession.selectiveScanDiagNative? {α : Type} [TorchLean.Storage α] (s : EagerSession α) {seqLen state : } (a b : TensorRef α [state]) (x : TensorRef α [seqLen, state]) (initial : TensorRef α [state]) :
        IO (Option (TensorRef α [seqLen, state]))

        Native shared-coefficient scan hook with gradients for coefficients, input, and state.

        Instances For
          def Runtime.Autograd.Torch.Internal.EagerSession.selectiveScanDiagVarNative? {α : Type} [TorchLean.Storage α] (s : EagerSession α) {seqLen state : } (a b x : TensorRef α [seqLen, state]) (initial : TensorRef α [state]) :
          IO (Option (TensorRef α [seqLen, state]))

          Native token-dependent scan hook, including coefficient and continuation-state gradients.

          Instances For
            def Runtime.Autograd.Torch.Internal.EagerSession.spectralConv1dRfftNative? {α : Type} [TorchLean.Storage α] (s : EagerSession α) {grid width modes : } (x : TensorRef α [grid, width]) (realWeight imagWeight : TensorRef α [modes, width, width]) :
            IO (Option (TensorRef α [grid, width]))

            Native one-sided spectral convolution with the same parameter layout as its reference.

            Instances For