]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
ggml-backend update: buffer types, backend registry, graph compare, tests (#620)
authorslaren <redacted>
Thu, 30 Nov 2023 18:03:03 +0000 (19:03 +0100)
committerGitHub <redacted>
Thu, 30 Nov 2023 18:03:03 +0000 (19:03 +0100)
commit38f46afdf2fa741d891e44739b202bf42a1c5d6f
tree233e5590195ba3e2963236aee92733dc902f0305
parenta5e4560425f83797327001f12fb780cf33606d87
ggml-backend update: buffer types, backend registry, graph compare, tests (#620)

* ggml-backend update

* update metal backend

* show metal logs with ggml-backend

* move buffer types to functions

* cuda: add per-device backends

* cuda: add host buffer type

* fix metal build

* ggml_backend_alloc_ctx_tensors : ignore allocated tensors

* ggml_backend_compare_graph_backend fixes

* ci : try to fix metal build

* metal : first print device info, then build kernels

* ci : disable GGML_METAL on Github Actions

* test-backend-ops initial impl (unary and get_rows)

* more op tests

* cleanup

* print test params, add more tests cases for add and mul

* add tests for im2col

* better f16 init

* metal : add basic impl of supports_op

* add test for ggml_concat

* update im2col test params, show callstack with GGML_ASSERT on CUDA failures

* add more rope tests

* add more rope and mul_mat test cases

* add more get_rows test cases
ggml-ci

* add more norm and rms_norm test cases with different eps

* ci : fix metal resource path

ggml-ci

* tests : silence warning

* add ggml_backend_tensor_alloc and ggml_backend_view_init for initializing tensors without ggml-alloc

* add mul_mat test cases without dims 3 and 4
ggml-ci

* check for nans and infs
ggml-ci

* add diag_mask_inf test cases without dims 3 and 4
ggml-ci

* fix cuda leak while backend reg

* fix msvc issues

* remove backend_sched debug causes by default

* gpt-2 : increase graph size

ggml-ci

---------

Co-authored-by: Georgi Gerganov <redacted>
24 files changed:
.github/workflows/ci.yml
ci/run.sh
examples/gpt-2/main-backend.cpp
examples/gpt-2/main-batched.cpp
examples/gpt-2/main.cpp
examples/whisper/whisper.cpp
include/ggml/ggml-alloc.h
include/ggml/ggml-backend.h
include/ggml/ggml.h
src/ggml-alloc.c
src/ggml-backend-impl.h
src/ggml-backend.c
src/ggml-cuda.cu
src/ggml-cuda.h
src/ggml-impl.h
src/ggml-metal.h
src/ggml-metal.m
src/ggml.c
tests/CMakeLists.txt
tests/test-backend-buffer.cpp [new file with mode: 0644]
tests/test-backend-ops.cpp [new file with mode: 0644]
tests/test-conv1d.cpp
tests/test-conv2d.cpp
tests/test-mul-mat.cpp