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

Add IVF-Flat C++ example #1828

Merged
merged 13 commits into from
Sep 26, 2023
Merged
Prev Previous commit
Next Next commit
Fix typos
  • Loading branch information
tfeher committed Sep 18, 2023
commit f126e51636bf013e1a06fdcb1fb9b73ae8d528a4
6 changes: 3 additions & 3 deletions cpp/template/src/ivf_flat_example.cu
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void print_results(raft::device_resources const& dev_resources,
raft::copy(neighbors_host.data_handle(), neighbors.data_handle(), neighbors.size(), stream);
raft::copy(distances_host.data_handle(), distances.data_handle(), distances.size(), stream);

// The calls to ivf_flat::search and raft::copy is asyncronous.
// The calls to ivf_flat::search and raft::copy is asynchronous.
// We need to sync the stream before accessing the data.
raft::resource::sync_stream(dev_resources, stream);

Expand Down Expand Up @@ -86,7 +86,7 @@ void ivf_flat_build_search_simple(raft::device_resources const& dev_resources,
ivf_flat::search(
dev_resources, search_params, index, queries, neighbors.view(), distances.view());

// The call to ivf_flat::search is asyncronous. Before accessing the data, sync by calling
// The call to ivf_flat::search is asynchronous. Before accessing the data, sync by calling
// raft::resource::sync_stream(dev_resources);

print_results(dev_resources, neighbors.view(), distances.view());
Expand Down Expand Up @@ -168,7 +168,7 @@ void ivf_flat_build_extend_search(raft::device_resources const& dev_resources,
ivf_flat::search(
dev_resources, search_params, index, queries, neighbors.view(), distances.view());

// The call to ivf_flat::search is asyncronous. Before accessing the data, sync using:
// The call to ivf_flat::search is asynchronous. Before accessing the data, sync using:
// raft::resource::sync_stream(dev_resources);

print_results(dev_resources, neighbors.view(), distances.view());
Expand Down