std1.0.0-beta-7 SafeC docs

std :: ml::gpu_cuda

Function std::cuda_rmsnorm

#include <std/ml/gpu_cuda.h> source ยท definition

int cuda_rmsnorm(
    struct CudaBuf x,
    struct CudaBuf w,
    struct CudaBuf y,
    unsigned long rows,
    unsigned long n,
    float eps,
)

RMSNorm per row: y[r] = x[r] / sqrt(mean(x[r]^2) + eps) * w, over 'rows' rows of 'n' values; w has n values, or dev == 0 for no weight. y may be x.