-
Notifications
You must be signed in to change notification settings - Fork 11.5k
[Bug] Different outputs when undefining GGML_SIMD #766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have checked the difference between optimized and not optimized if (fabs(sumf - sumf2) > 1e-5) {
printf("sumf = %f, sumf2 = %f\n", sumf, sumf2);
}
For epsilon 1e-4 there is no output. |
Perplexity test. With SIMD enabled in ggml_vec_dot_f16:
Without SIMD in
Tested with:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Expected Behavior
Same model outputs with enabled and disabled SIMD instructions.
Environment and Context
$ lscpu
$ uname -a
$ g++ --version
Failure Information (for bugs)
Seems like there is a bug in
ggml_vec_dot_f16
.Steps to Reproduce
Please provide detailed steps for reproducing the issue. We are not sitting in front of your screen, so the more detail the better.
Output
With defined GGML_SIMD (current behavior)
With undefined GGML_SIMD:
As is, but with inverted branch
#if defined(GGML_SIMD)
ininline static void ggml_vec_dot_f16(const int n, float * restrict s, ggml_fp16_t * restrict x, ggml_fp16_t * restrict y)
like so:#if !defined(GGML_SIMD)
:Git blame shows @ggerganov
The text was updated successfully, but these errors were encountered: