]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
move BLAS to a separate backend (#6210)
authorslaren <redacted>
Thu, 13 Jun 2024 01:11:35 +0000 (03:11 +0200)
committerGitHub <redacted>
Thu, 13 Jun 2024 01:11:35 +0000 (03:11 +0200)
commitf578b86b2123d0f92afbaa98a031df4d4464e582
tree2a21feec089e5fcaa6f9d34be5468a17c3a5ddc7
parent1c641e6aac5c18b964e7b32d9dbbb4bf5301d0d7
move BLAS to a separate backend (#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>
17 files changed:
CMakeLists.txt
Makefile
examples/llama-bench/llama-bench.cpp
ggml-alloc.c
ggml-backend-impl.h
ggml-backend.c
ggml-backend.h
ggml-blas.cpp [new file with mode: 0644]
ggml-blas.h [new file with mode: 0644]
ggml-cuda.cu
ggml-kompute.cpp
ggml-metal.m
ggml-rpc.cpp
ggml-sycl.cpp
ggml-vulkan.cpp
ggml.c
llama.cpp