std1.0.0-beta-7 SafeC docs

std :: ml::gpu_rocm

Function std::rocm_mse_grad

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

int rocm_mse_grad(
    struct RocmBuf y,
    struct RocmBuf t,
    struct RocmBuf dy,
    struct RocmBuf loss1,
)

Fused MSE gradient: dy = 2 (y - t) and loss1[0] = sum((y - t)^2), in one pass.