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

avoid async copy crash when extremely large concurrency #410

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions src/common/raft/integration/raft_knowhere_index.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ struct raft_knowhere_index<IndexKind>::impl {
res, index_params, raft::make_const_mdspan(host_data));
}
}
this->synchronize();
}

void
Expand Down Expand Up @@ -462,6 +463,7 @@ struct raft_knowhere_index<IndexKind>::impl {
RAFT_FAIL("Index has not yet been trained");
}
}
this->synchronize();
}

auto
Expand Down Expand Up @@ -576,6 +578,7 @@ struct raft_knowhere_index<IndexKind>::impl {
raft::copy(res, host_ids, device_knowhere_ids);
raft::copy(res, host_distances, device_distances);
}
this->synchronize();
return std::make_tuple(ids.release(), distances.release());
}
void
Expand All @@ -601,6 +604,7 @@ struct raft_knowhere_index<IndexKind>::impl {
} else {
raft::serialize_scalar(res, os, false);
}
this->synchronize();
}
auto static deserialize(std::istream& is) {
auto new_device_id = select_device_id();
Expand All @@ -621,6 +625,7 @@ struct raft_knowhere_index<IndexKind>::impl {
res, des_index, raft::make_const_mdspan(dataset->view()));
}
}
this->synchronize();
return std::make_unique<typename raft_knowhere_index<index_kind>::impl>(std::move(des_index), new_device_id,
std::move(dataset));
}
Expand Down
Loading