TorchLean API

NN.Backend.NativeCUDA

Native CUDA Backend Capsules #

Capsule metadata for TorchLean's native CUDA runtime provider.

These capsules describe kernels that currently live under csrc/cuda/** and are exposed to Lean through NN.Runtime.Autograd.Engine.Cuda.*. The C/CUDA source still owns the implementation; this module gives the planner a typed, inspectable contract layer for those implementation choices.

def NN.Backend.NativeCUDA.nativeCapsule (name : String) (op : BackendOp) (specName valueSummary vjpSummary : String) (vjpMode : VJPMode := VJPMode.backendVJP) :
Instances For
    Instances For

      Native CUDA batched/matrix multiplication, backed by CUDA/cuBLAS paths.

      Instances For

        Native CUDA batched matrix multiplication.

        Instances For

          Native CUDA ReLU activation.

          Instances For

            Native CUDA GELU activation.

            Instances For

              Native CUDA row/axis softmax kernels.

              Instances For

                Native CUDA layer normalization.

                Instances For

                  Native CUDA batch normalization.

                  Instances For

                    Native CUDA channel-first BatchNorm runtime op.

                    Instances For

                      Native CUDA generic channel-first convolution.

                      Instances For

                        Native CUDA 2D convolution.

                        Instances For

                          Native CUDA generic channel-first transpose convolution.

                          Instances For

                            Native CUDA 2D transpose convolution.

                            Instances For

                              Native CUDA max pooling.

                              Instances For

                                Native CUDA 2D max pooling.

                                Instances For

                                  Native CUDA padded 2D max pooling.

                                  Instances For

                                    Native CUDA smooth max pooling.

                                    Instances For

                                      Native CUDA smooth 2D max pooling.

                                      Instances For

                                        Native CUDA average pooling.

                                        Instances For

                                          Native CUDA 2D average pooling.

                                          Instances For

                                            Native CUDA padded 2D average pooling.

                                            Instances For

                                              Native CUDA linear layer.

                                              Instances For

                                                Native CUDA mean-squared-error loss.

                                                Instances For

                                                  Native CUDA FFT/FNO kernels.

                                                  Instances For

                                                    Native CUDA selective scan kernels.

                                                    Instances For

                                                      Native CUDA capsules, excluding attention which has a dedicated semantic split.

                                                      Instances For