@@ -64,9 +64,7 @@ fn create_distributed_embeddings(
64
64
memory_scope_percent : usize ,
65
65
) -> Option < DistributedEmbeddings > {
66
66
let colocations_count = fu:: count_colocations ( ) ;
67
- println ! (
68
- "Initializing storage across {colocations_count} colocations"
69
- ) ;
67
+ println ! ( "Initializing storage across {colocations_count} colocations" ) ;
70
68
71
69
// Calculate total capacity based on total system memory and scope percentage
72
70
let total_memory = fu:: volume_any_pages ( ) ;
@@ -164,7 +162,7 @@ fn numa_aware_search(
164
162
// Search vectors assigned to this thread
165
163
for local_vector_idx in range {
166
164
if let Some ( vector) = node_vectors. get ( local_vector_idx) {
167
- let similarity = bf16:: cosine ( query, vector) . unwrap ( ) ;
165
+ let similarity = bf16:: dot ( query, vector) . unwrap ( ) ;
168
166
// Convert local index to global round-robin index using the new method
169
167
let global_index =
170
168
storage. local_to_global_index ( colocation_index, local_vector_idx) ;
@@ -228,7 +226,7 @@ fn worst_case_search(
228
226
// Search vectors assigned to this thread, regardless of NUMA locality
229
227
for local_vector_idx in range {
230
228
if let Some ( vector) = node_vectors. get ( local_vector_idx) {
231
- let similarity = bf16:: cosine ( query, vector) . unwrap ( ) ;
229
+ let similarity = bf16:: dot ( query, vector) . unwrap ( ) ;
232
230
// Convert to global index for consistent comparison
233
231
let global_index =
234
232
storage. local_to_global_index ( colocation_index, local_vector_idx) ;
0 commit comments