tests : do not use slope for large soft_max

accumulates too much error

ggml-ci
This commit is contained in:
Georgi Gerganov 2024-02-14 16:54:54 +02:00
parent 69da57c00b
commit 5261fb2dbe
No known key found for this signature in database
GPG key ID: 449E073F9DC10735

View file

@ -2095,7 +2095,7 @@ static bool test_backend(ggml_backend_t backend, test_mode mode, const char * op
for (int n = 0; n < 10; ++n) {
int64_t ne0 = dist_ne0(rng);
int64_t ne1 = dist_ne1(rng);
test_cases.emplace_back(new test_soft_max(GGML_TYPE_F32, {ne0, ne1, 1, 1}, n/2 == 0, n/3 == 0, 0.1f));
test_cases.emplace_back(new test_soft_max(GGML_TYPE_F32, {ne0, ne1, 1, 1}, n/2 == 0, n/3 == 0 && ne0 < 1000, 0.1f));
}
exponent <<= 1;