std :: ml::gpu_mps
Function std::mps_mul_f32_chained
int mps_mul_f32_chained(struct MpsBuf bufA, const &float b, &float out, unsigned long n)out[i] = bufA[i] * b[i] -- generic chained elementwise multiply (one pending GPU input, one plain CPU array), used by Tensor::square_gpu's backward: 2*diff (still GPU-pending from the forward pass) times the incoming gradient (an ordinary CPU array -- see __sum_backward, which writes it eagerly with no GPU involvement at all).