Added testing and performance benchmarking support for the FP kernels#2
Merged
Conversation
…duced changes in the cmake files to build these test files
|
@xctan it would be lovely to have your review on that as it will go to upstream next. |
luhenry
approved these changes
Dec 11, 2025
luhenry
left a comment
There was a problem hiding this comment.
I don't know enough about Llama.cpp to properly review this PR. @david-baker-808 maybe we should go straight to upstream with this change?
xctan
reviewed
Dec 11, 2025
| } | ||
| } | ||
|
|
||
| static void validate_dot_unroll(size_t n, int xs, void * xv, const std::vector<ggml_fp16_t> & y, TestStats & stats) { |
There was a problem hiding this comment.
I noticed some CI jobs are failing because the const qualifier was dropped. Could you also fix the signatures for ggml_vec_dot_f16 and ggml_vec_dot_f16_unroll?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added testing and performance benchmarking support for the FP kernels. These tests are architecture agnostic and I have also tested them on x86.
Since the FP kernels are defined as static functions inside vec.h, they cannot be linked from the ggml-cpu library. For this reason, the test files include vec.h directly.
To compile vec.h correctly, architecture-specific flags are required. These flags are normally computed in ggml/src/ggml-cpu/CMakeLists.txt, so this PR exports them to ensure the test targets build with the correct configuration.