std1.0.0-beta-7 SafeC docs

std :: ml::gpu_mps

Function std::mps_scale_f16_chained

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

int mps_scale_f16_chained(
    struct MpsBuf buf,
    float k,
    &unsigned short out,
    unsigned long n,
)

out[i] = buf[i] * k -- 'k' is a plain float scalar (see gpu_mps_ kernels.metal's scale_kernel_f16/bf16 comment on why the scalar itself stays float-precision).