-
Notifications
You must be signed in to change notification settings - Fork 2
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
Basic cpu iris search using HNSW #327
Conversation
@@ -63,6 +63,32 @@ impl<N: NetworkTrait> IrisWorker<N> { | |||
Ok(res) | |||
} | |||
|
|||
pub(crate) async fn rep3_dot_non_blocking( | |||
&mut self, | |||
a: &VecShare<u16>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think also the whole VecShare
type can probably go here, since it is just a wrapper around Vec<Share<T>>
. I think this was leftover from some experiments on holding the internal shares as two separate vectors of all a
and all b
sub-shares.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean here. There are some associated functions implemented for VecShare
, which would make things a bit more difficult to change all VecShare
to Vec<Share<_>>
Or do you mean passing a: VecShare<u16>
instead of a: &VecShare<u16>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would gladly change this to https://docs.rs/ndarray/latest/ndarray/index.html instead 😄 so we can get other vector operations for free hehe
(*lock) | ||
.rep3_lift_and_cross_mul(d1, t1 as u32, d2, t2 as u32) | ||
.unwrap() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think mixing async and sync stuff here is not what we want. I would spend some time and unify the networking stuff into only async calls and then not mix them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, will refactor this once we merge this in and grab this one: #354
Should solve all our issues related to locking
So I guess the plan is to merge this and then build on it, improve the networking etc? |
That's correct 👍 |
Adds prototype of HNSW search using CPU.
Concretely:
IrisWorker
struct. In the future I believe all these functions are going to be async - to avoid calling blocking code.