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

Adding throughput and latency modes to raft-ann-bench #1920

Merged
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5f740ab
Adding throughput mode to benhcmarksy
cjnolet Oct 20, 2023
1f75ede
Adding docs
cjnolet Oct 20, 2023
638ecb6
Merge branch 'branch-23.12' into fea-2312-benchmarks_throughput_mode
cjnolet Oct 20, 2023
c11685c
Will probably have to integrate stream logic into the threads of the …
cjnolet Oct 21, 2023
596703a
Merge branch 'fea-2312-benchmarks_throughput_mode' of github.com:cjno…
cjnolet Oct 21, 2023
7d8c907
Still some work to do and need to understand how googlebench multithr…
cjnolet Oct 22, 2023
2d6e0ca
Successfully having one thread load the data
cjnolet Oct 23, 2023
7c80266
Fixing syntax error
cjnolet Oct 23, 2023
adf2f44
Minor things
cjnolet Oct 23, 2023
89786ff
Removing cudart_utils from benchmark.hpp
cjnolet Oct 23, 2023
4573050
Removing all cuda includes from benchmark.hpp
cjnolet Oct 23, 2023
392f6a1
Adding `end_to_end` time and verifying the total_queries / end_to_end…
cjnolet Oct 23, 2023
18b57cc
More updates
cjnolet Oct 23, 2023
bda392f
Removing cudaStreamPerThread from benchmark.hpp
cjnolet Oct 25, 2023
6946452
Merge branch 'branch-23.12' into fea-2312-benchmarks_throughput_mode
cjnolet Oct 26, 2023
a21f668
Removing thread pool. It's not being used
cjnolet Oct 27, 2023
70419e3
Merge branch 'fea-2312-benchmarks_throughput_mode' of github.com:cjno…
cjnolet Oct 27, 2023
f592eb6
Adding new mode to docs
cjnolet Oct 27, 2023
ab6e0d0
Fixing "search-mode" option
cjnolet Oct 27, 2023
aec2664
Updates based on review feedback
cjnolet Oct 27, 2023
3b8eb22
Apply suggestions from code review
cjnolet Oct 27, 2023
92f1403
Update python/raft-ann-bench/src/raft-ann-bench/run/__main__.py
cjnolet Oct 27, 2023
b813d19
Updating docs
cjnolet Oct 27, 2023
94037eb
Merge branch 'fea-2312-benchmarks_throughput_mode' of github.com:cjno…
cjnolet Oct 27, 2023
d2f9350
Merge branch 'branch-23.12' into fea-2312-benchmarks_throughput_mode
cjnolet Oct 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions cpp/bench/ann/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,8 @@ if(RAFT_ANN_BENCH_USE_GGNN)
endif()

if(RAFT_ANN_BENCH_USE_FAISS)
# We need to ensure that faiss has all the conda
# information. So we currently use the very ugly
# hammer of `link_libraries` to ensure that all
# targets in this directory and the faiss directory
# We need to ensure that faiss has all the conda information. So we currently use the very ugly
# hammer of `link_libraries` to ensure that all targets in this directory and the faiss directory
# will have the conda includes/link dirs
link_libraries($<TARGET_NAME_IF_EXISTS:conda_env>)
include(cmake/thirdparty/get_faiss.cmake)
Expand Down
17 changes: 15 additions & 2 deletions cpp/bench/ann/src/common/ann_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@

namespace raft::bench::ann {

enum Objective {
THROUGHPUT, // See how many vectors we can push through
LATENCY // See how many
cjnolet marked this conversation as resolved.
Show resolved Hide resolved
};

enum class MemoryType {
Host,
HostMmap,
Expand Down Expand Up @@ -59,10 +64,17 @@ inline auto parse_memory_type(const std::string& memory_type) -> MemoryType
}
}

struct AlgoProperty {
class AlgoProperty {
public:
inline AlgoProperty() {}
inline AlgoProperty(MemoryType dataset_memory_type_, MemoryType query_memory_type_)
: dataset_memory_type(dataset_memory_type_), query_memory_type(query_memory_type_)
{
}
MemoryType dataset_memory_type;
// neighbors/distances should have same memory type as queries
MemoryType query_memory_type;
virtual ~AlgoProperty() = default;
};

class AnnBase {
Expand All @@ -79,7 +91,8 @@ template <typename T>
class ANN : public AnnBase {
public:
struct AnnSearchParam {
virtual ~AnnSearchParam() = default;
Objective metric_objective = Objective::LATENCY;
virtual ~AnnSearchParam() = default;
[[nodiscard]] virtual auto needs_dataset() const -> bool { return false; };
};

Expand Down
Loading
Loading