]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
ggml : replace conv 1D - 2D stage_0 and stage_1 with im2col and mul_mat (#564)
authorSteward Garcia <redacted>
Sun, 12 Nov 2023 13:34:04 +0000 (08:34 -0500)
committerGitHub <redacted>
Sun, 12 Nov 2023 13:34:04 +0000 (15:34 +0200)
commitba779f117ecc20f605df6f75dc7d92fb114bf17e
tree666bbd3992d92385ab18ddd68021f49faa8e0e0d
parent239defe61dbe9dddc6304942e8a3d03d6a3c69ab
ggml : replace conv 1D - 2D stage_0 and stage_1 with im2col and mul_mat (#564)

* added conv2d stage 0 - 1 cuda kernels

* add im2col + refactor conv1d and conv2d

* fix params invalid index

* add conv1d and conv2d unit tests

* resolving wrong values and fix mul_mat validation

* improve tests + reduce code duplication

* add cuda kernels

* more data test

* fix ggml_op_count to 70

* add temp test - gemm != mul_mat

* tests : fix test-mul-mat matrix multiplication

* test-mul-mat match gemm == ggml_mul_mat with conv2d op

* replaced gemm by ggml_mul_mat

* ggml_mul_mat cpu backend support fp16 src1

* ggml_mul_mat cuda backend fp16 fixed

* remove unnecessary ggml_cont and removed conv1d-2d functions deprecated

* some fixes

* explain conv1d reshapes

* ggml : fix tests on Arm + do not use BLAS for F16 data

* tests : fix FP16 handling on Arm

* ggml : avoid ggml_cont and ggml_transpose in ggml_conv_xd

* ci : switch back to release

* cuda : fix wrong pointer usage

* ggml : add metal support for im2col and f16xf16 mul mat

* ggml : im2col opts

* Update src/ggml-cuda.cu

Co-authored-by: slaren <redacted>
---------

Co-authored-by: Georgi Gerganov <redacted>
Co-authored-by: slaren <redacted>
include/ggml/ggml.h
src/ggml-cuda.cu
src/ggml-metal.m
src/ggml-metal.metal
src/ggml.c
tests/CMakeLists.txt
tests/test-conv1d.cpp [new file with mode: 0644]
tests/test-conv2d.cpp [new file with mode: 0644]
tests/test-mul-mat.cpp [new file with mode: 0644]