Skip to content

Added testing and performance benchmarking support for the FP kernels#2

Merged
luhenry merged 3 commits into
masterfrom
10x/test-float
Dec 18, 2025
Merged

Added testing and performance benchmarking support for the FP kernels#2
luhenry merged 3 commits into
masterfrom
10x/test-float

Conversation

@rehan-10xengineer

Copy link
Copy Markdown
Collaborator

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.

…duced changes in the cmake files to build these test files
@rehan-10xengineer rehan-10xengineer self-assigned this Nov 22, 2025
@taimur-10x taimur-10x marked this pull request as draft November 22, 2025 14:08
@taimur-10x taimur-10x marked this pull request as ready for review December 8, 2025 20:06
@luhenry

luhenry commented Dec 11, 2025

Copy link
Copy Markdown

@xctan it would be lovely to have your review on that as it will go to upstream next.

@luhenry luhenry left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread tests/test-float-fns.cpp Outdated
}
}

static void validate_dot_unroll(size_t n, int xs, void * xv, const std::vector<ggml_fp16_t> & y, TestStats & stats) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@luhenry luhenry merged commit 12ef1e0 into master Dec 18, 2025
42 of 78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants