]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
move BLAS to a separate backend (llama/6210)
authorslaren <redacted>
Thu, 13 Jun 2024 01:11:35 +0000 (03:11 +0200)
committerGeorgi Gerganov <redacted>
Sat, 15 Jun 2024 19:05:47 +0000 (22:05 +0300)
commitf54604efc03f81b7ca605071cace087d9d0a390d
tree6139d79788d520e9a11fa6eddba92b2e92939674
parent91f2ca8bb10a6051150b6a72fb7cf10f348ab419
move BLAS to a separate backend (llama/6210)

* move BLAS to a separate backend

* rename GGML_USE_OPENBLAS to GGML_USE_BLAS

* alloc : reuse same buffer when the same buffer type if used multiple times

* set number of threads automatically for openblas and blis

* sched : print assignments when GGML_SCHED_DEBUG env variable is set

* sched : allow ops with weights on an incompatible buffer type

This will cause the weight to be copied to a backend that supports the
op, which is very costly. The weight should have been stored in a buffer
of a backend that can run the op, but llama.cpp cannot do this
automatically at the moment.

---------

Co-authored-by: Georgi Gerganov <redacted>
13 files changed:
ggml-blas.cpp [new file with mode: 0644]
ggml-blas.h [new file with mode: 0644]
include/ggml/ggml-backend.h
src/ggml-alloc.c
src/ggml-backend-impl.h
src/ggml-backend.c
src/ggml-cuda.cu
src/ggml-kompute.cpp
src/ggml-metal.m
src/ggml-rpc.cpp
src/ggml-sycl.cpp
src/ggml-vulkan.cpp
src/ggml.c