std1.0.0-beta-7 SafeC docs

std :: ml::gpu_mps

Function std::mps_sub_f32_chained

#include <std/ml/gpu_mps.h> source · definition

int mps_sub_f32_chained(struct MpsBuf bufA, const &float b, &float out, unsigned long n)

out[i] = bufA[i] - b[i] -- same chaining shape as mps_matmul_f32_chained/ mps_relu_f32_chained above, used by tensor_sub_gpu for the loss computation's diff = pred - target (pred, e.g. a matmul's output, is still GPU-pending; target is an ordinary already-populated Tensor).