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

feat: benchmark binary dot product & min max residual #18

Merged
merged 2 commits into from
Feb 11, 2025
Merged

Conversation

kemingy
Copy link
Owner

@kemingy kemingy commented Feb 11, 2025

No description provided.

@Copilot Copilot bot review requested due to automatic review settings February 11, 2025 09:58
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • src/distance.rs: Evaluated as low risk
Comments suppressed due to low confidence (4)

src/kmeans.rs:132

  • [nitpick] The debug message format in rabitq_assign_parallel should match the format in rabitq_assign for consistency.
"RaBitQ: rough_cmp({}), precise_cmp({}), ratio({})",

src/kmeans.rs:306

  • Ensure that the new base_assign_parallel function is covered by tests to verify its behavior in multi-threaded execution.
base_assign_parallel(&vecs, &centroids, dim, self.distance, &mut labels);

src/kmeans.rs:311

  • Ensure that the new rabitq_assign_parallel function is covered by tests to verify its behavior in multi-threaded execution.
rabitq_assign_parallel(&vecs, &centroids, dim, &mut labels);

src/rabitq.rs:105

  • [nitpick] The function name min_max_native is ambiguous and inconsistent with the naming convention used elsewhere. It should be renamed to min_max_residual_native to be more descriptive and consistent.
pub fn min_max_native(res: &mut [f32], x: &[f32], y: &[f32]) -> (f32, f32) {

Signed-off-by: Keming <[email protected]>
@kemingy kemingy requested a review from Copilot February 11, 2025 10:06
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 6 out of 8 changed files in this pull request and generated 2 comments.

Files not reviewed (2)
  • src/distance.rs: Evaluated as low risk
  • src/rabitq.rs: Evaluated as low risk
Comments suppressed due to low confidence (3)

src/simd.rs:551

  • The function binary_dot_product_simd lacks test coverage. Please add test cases to ensure its correctness and handle edge cases.
pub unsafe fn binary_dot_product_simd(lhs: &[u64], rhs: &[u64]) -> u32 {

src/kmeans.rs:22

  • [nitpick] The function name 'base_assign' could be more descriptive. Consider renaming it to 'assign_single_thread' for clarity.
pub fn base_assign(

src/kmeans.rs:51

  • [nitpick] The function name 'base_assign_parallel' could be more descriptive. Consider renaming it to 'assign_multi_thread' for clarity.
pub fn base_assign_parallel(

@kemingy kemingy merged commit c2b8805 into main Feb 11, 2025
6 checks passed
@kemingy kemingy deleted the bench_binary_ip branch February 11, 2025 10:13
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.

1 participant