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

Various fixes to reproducible benchmarks #1800

Merged
merged 120 commits into from
Sep 11, 2023

Conversation

cjnolet
Copy link
Member

@cjnolet cjnolet commented Sep 1, 2023

No description provided.

achirkin and others added 30 commits August 9, 2023 13:19
@cjnolet
Copy link
Member Author

cjnolet commented Sep 1, 2023

/ok to test

@cjnolet
Copy link
Member Author

cjnolet commented Sep 2, 2023

/ok to test

@cjnolet
Copy link
Member Author

cjnolet commented Sep 2, 2023

/ok to test

@cjnolet
Copy link
Member Author

cjnolet commented Sep 2, 2023

/ok to test

};

using typename ANN<T>::AnnSearchParam;
struct SearchParam : public AnnSearchParam {
int ef;
int num_threads{1};
int num_threads = omp_get_num_procs();
Copy link
Contributor

@achirkin achirkin Sep 5, 2023

Choose a reason for hiding this comment

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

Does this work well with num_threads > n_queries? We've had a similar logic in raft host refinement and the performance on small batches was horrible due to overheads of managing many threads compared to the amount of work (n_queries = 1).

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question. This one is challenging because we don't (and shouldn't) know the number of queries when we set this argument. We could set it to something small(ish) like 8 or 16, but that would just lower the saturation point for larger batch queries. In general, I know the queries for online systems are going to be long tailed, with 1 being in the main mass and >= 100 being in the tail.

The problem is that when we run larger batch sizes, we aren't giving hnsw an fair try at all. My thinking was to take the middle ground- setting this to the number of cores. I guess I should measure the impact directly. What kind of perf difference are you seeing for, say, batch size of 10 when the thread pool contains the number of available cores?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this explicit pool does better job than the openmp machinery that we rely upon in the refine operation. But there, I've got something like ~100x boost for a single-query batch n_queries = 1 (72 cores). I've done some other refactoring at the same time though.

@cjnolet
Copy link
Member Author

cjnolet commented Sep 5, 2023

/ok to test

@cjnolet
Copy link
Member Author

cjnolet commented Sep 8, 2023

/ok to test

@cjnolet
Copy link
Member Author

cjnolet commented Sep 8, 2023

/merge

@ajschmidt8 ajschmidt8 removed the request for review from a team September 11, 2023 13:22
@cjnolet
Copy link
Member Author

cjnolet commented Sep 11, 2023

/ok to test

@cjnolet
Copy link
Member Author

cjnolet commented Sep 11, 2023

/merge

@rapids-bot rapids-bot bot merged commit c59c9d1 into rapidsai:branch-23.10 Sep 11, 2023
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cpp improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
Development

Successfully merging this pull request may close these issues.

4 participants