Get POSIX threads working on Apple Silicon

It's now possible to run a working

    ape-m1 o/aarch64/third_party/ggml/llama.com

on Apple M1 hardware running XNU!
This commit is contained in:
Justine Tunney 2023-06-03 18:32:33 -07:00
parent 8fdb31681a
commit b5eab2b0b7
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
3 changed files with 78 additions and 16 deletions

View file

@ -1128,8 +1128,10 @@ static void llama_model_load_internal(
const size_t mem_required_state =
scale*MEM_REQ_KV_SELF().at(model.type);
if (verbose > 0) {
fprintf(stderr, "%s: mem required = %7.2f MB (+ %7.2f MB per state)\n", __func__,
mem_required / 1024.0 / 1024.0, mem_required_state / 1024.0 / 1024.0);
}
#ifdef GGML_USE_CUBLAS
const int n_gpu = std::min(n_gpu_layers, int(hparams.n_layer));