CUDA Tape Operations: Matrix, FFT, and Loss Nodes #
Linear algebra #
def
Runtime.Autograd.Cuda.Tape.spectralConv1dRfft
{grid width modes : ℕ}
(t : Tape)
(xId wReId wImId : ℕ)
:
Fused real-FFT spectral convolution used by the CUDA FNO1D path.
Shapes:
x : (grid, width),wRe, wIm : (modes, width, width),- output
y : (grid, width).
The low-level buffer primitive owns the numerical contract and VJP:
rfft(x) is unnormalized, the inverse is normalized, and the backward kernels include the
half-spectrum adjoint factors for real FFTs. This tape node simply records those three parent
dependencies and checks the runtime shapes before calling the native kernels.
Instances For
Linear layer / losses #
Mean-squared-error loss with "mean" reduction (single scalar output).