metal : minor fix [no ci]

This commit is contained in:
Georgi Gerganov 2024-10-07 10:49:25 +03:00
parent 5f71096e47
commit 1bd5018c63
No known key found for this signature in database
GPG key ID: BF970631944C16B7

View file

@ -60,7 +60,7 @@ static id<MTLDevice> ggml_backend_metal_device_acq(struct ggml_backend_metal_dev
ctx->support_simdgroup_mm = [ctx->mtl_device supportsFamily:MTLGPUFamilyApple7];
strncpy(ctx->name, [[ctx->mtl_device name] UTF8String], sizeof(ctx->name));
strncpy(ctx->name, [[ctx->mtl_device name] UTF8String], sizeof(ctx->name) - 1);
}
ctx->mtl_device_ref_count++;