metal : return null if load pipeline failed

This commit is contained in:
jhen 2023-08-11 07:22:47 +08:00
parent 487cd25086
commit 582ba1b478

View file

@ -163,6 +163,7 @@ struct ggml_metal_context * ggml_metal_init(int n_cb) {
fprintf(stderr, "%s: loaded %-32s %16p\n", __func__, "kernel_"#name, (void *) ctx->pipeline_##name); \
if (error) { \
fprintf(stderr, "%s: load pipeline error: %s\n", __func__, [[error description] UTF8String]); \
return NULL; \
}
GGML_METAL_ADD_KERNEL(add);