Skip to content

benchmark-matmult : do not use integer abs() on a float #3277

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

Merged
merged 2 commits into from
Sep 20, 2023

Conversation

cebtenzzre
Copy link
Collaborator

Fixes this clang warning, which I only saw when I was using clang 3.7:

examples/benchmark/benchmark-matmult.cpp:253:23: warning: using integer absolute value function 'abs' when argument is of
      floating point type [-Wabsolute-value]
        float delta = abs(sum_of_Q4_result - sum_of_F32_reference);
                      ^
examples/benchmark/benchmark-matmult.cpp:253:23: note: use function 'std::abs' instead
        float delta = abs(sum_of_Q4_result - sum_of_F32_reference);
                      ^~~
                      std::abs
1 warning generated.

@cebtenzzre cebtenzzre merged commit 65c2c1c into ggml-org:master Sep 20, 2023
pkrmf pushed a commit to morlockstudios-com/llama.cpp that referenced this pull request Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants