ggml : unary ops support non-cont src0 + metal F16 unary ops (#19511)

* ggml : unary ops support non-cont src0

* metal : support F16 unary ops + fix ELU
This commit is contained in:
Georgi Gerganov 2026-02-11 18:58:43 +02:00 committed by GitHub
parent 3136a849db
commit 914dde72ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 164 additions and 78 deletions

View file

@ -1943,7 +1943,11 @@ struct test_unary : public test_case {
ggml_tensor * a;
if (v & 1) {
auto ne = ne_a; ne[0] *= 3;
auto ne = ne_a;
ne[0] *= 3;
ne[1] *= 2;
ne[2] *= 5;
ne[3] *= 4;
a = ggml_new_tensor(ctx, type, 4, ne.data());
if (grad_supported) {
ggml_set_param(a);