Skip to content
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

oneAPI, intel icx/icpx: Fix compile warnings "explicit comparison with infinity in fast floating point mode" #4816

Closed
stolsvik opened this issue Jan 7, 2024 · 2 comments
Labels
enhancement New feature or request stale

Comments

@stolsvik
Copy link

stolsvik commented Jan 7, 2024

Feature Description

Would be nice to not have lots of compile warnings.

These are present for multiple files, most notably in ggml.c:

[  1%] Building C object CMakeFiles/ggml.dir/ggml.c.o
/home/endre/LLAMA-file/llama.cpp.git/ggml.c:11177:23: warning: explicit comparison with infinity in fast floating point mode [-Wtautological-constant-compare]
 11177 |             if (wp[i] == -INFINITY) {
       |                 ~~~~~ ^  ~~~~~~~~~
/home/endre/LLAMA-file/llama.cpp.git/ggml.c:12849:42: warning: explicit comparison with infinity in fast floating point mode [-Wtautological-constant-compare]
 12849 |                         } else if (SS[j] == -INFINITY) {
       |                                    ~~~~~ ^  ~~~~~~~~~
/home/endre/LLAMA-file/llama.cpp.git/ggml.c:13054:35: warning: explicit comparison with infinity in fast floating point mode [-Wtautological-constant-compare]
 13054 |                         if (SS[j] == -INFINITY) {
       |                             ~~~~~ ^  ~~~~~~~~~
/home/endre/LLAMA-file/llama.cpp.git/ggml.c:13502:50: warning: explicit comparison with infinity in fast floating point mode [-Wtautological-constant-compare]
 13502 |                                 } else if (SR[j] == -INFINITY) {
       |                                            ~~~~~ ^  ~~~~~~~~~
/home/endre/LLAMA-file/llama.cpp.git/ggml.c:14251:27: warning: explicit comparison with infinity in fast floating point mode [-Wtautological-constant-compare]
 14251 |                 if (s0[i] == -INFINITY) {
       |                     ~~~~~ ^  ~~~~~~~~~
/home/endre/LLAMA-file/llama.cpp.git/ggml.c:14365:27: warning: explicit comparison with infinity in fast floating point mode [-Wtautological-constant-compare]
 14365 |                 if (s0[i] == -INFINITY) {
       |                     ~~~~~ ^  ~~~~~~~~~
6 warnings generated.

Motivation

It is a bit demotivating to see quite a bit of compile warnings when compiling a program.

Evidently these didn't matter, yi-34b-chat.Q6_K.gguf runs just fine. However, on my Xeon 6150, there was exactly 0 speedup by using oneAPI, so I am not sure it actually runs the code that possibly could be hit by these warnings?

Copy link
Contributor

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Mar 18, 2024
Copy link
Contributor

github-actions bot commented Apr 4, 2024

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as completed Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

1 participant