std :: ml::gpu_mps
Function std::mps_dispatch
int mps_dispatch(
const &char kernel,
[]const MpsBuf bufs,
[]const unsigned char params,
unsigned long groups,
unsigned long groupSize,
)Runs kernel 'kernel' of the embedded library (gpu_mps_kernels.metal) on 'groups' threadgroups of 'groupSize' threads (one dimension): buffers bufs bound at indices 0 .. bufs.len-1 and, when params isn't empty, its bytes (copied at encode time) at index bufs.len. Encoded onto the open batch, or run and waited for outside one, like mps_gemm. The pipeline is built on first use and cached by name (at most 64 names; the cache keeps the 'kernel' pointer, so pass a string literal). 1 = done/encoded, 0 = unknown kernel, an invalid buffer, a group larger than the kernel allows, or no Metal device.