Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion cpp/src/neighbors/detail/ann_utils.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ struct config<float> {
};
template <>
struct config<half> {
using value_t = half;
using value_t = float;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check whether this is used outside the IVF-Flat. Changing the accumulation type like this can have a drastic impact on performance.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did simple benchmark and it showed no significant differences. I'll use cuvs ann-bench to get a more detailed benchmark results later

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hhy3 any updates here? We're about to begin burndown for 25.08 release. Should we consider this for 25.08 or push to 25.10 (October)?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cjnolet hi, push it to 25.10, thx

static constexpr double kDivisor = 1.0;
};
template <>
Expand Down
12 changes: 6 additions & 6 deletions cpp/src/neighbors/ivf_flat/ivf_flat_interleaved_scan.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ struct loadAndComputeDist {
for (int k = 0; k < Veclen; ++k) {
compute_dist(dist, queryRegs[k], encV[k]);
if constexpr (ComputeNorm) {
norm_query += queryRegs[k] * queryRegs[k];
norm_data += encV[k] * encV[k];
norm_query += (AccT)(queryRegs[k] * queryRegs[k]);
norm_data += (AccT)(encV[k] * encV[k]);
}
}
}
Expand Down Expand Up @@ -173,8 +173,8 @@ struct loadAndComputeDist {
T q = raft::shfl(queryReg, d + k, raft::WarpSize);
compute_dist(dist, q, encV[k]);
if constexpr (ComputeNorm) {
norm_query += q * q;
norm_data += encV[k] * encV[k];
norm_query += (AccT)(q * q);
norm_data += (AccT)(encV[k] * encV[k]);
}
}
}
Expand All @@ -199,8 +199,8 @@ struct loadAndComputeDist {
T q = raft::shfl(queryReg, d + k, raft::WarpSize);
compute_dist(dist, q, enc[k]);
if constexpr (ComputeNorm) {
norm_query += q * q;
norm_data += enc[k] * enc[k];
norm_query += (AccT)(q * q);
norm_data += (AccT)(enc[k] * enc[k]);
}
}
}
Expand Down