Skip to content

Commit b72b0f0

Browse files
Improve: bf16 support (#558)
Closes #553 Co-authored-by: Ash Vardanian <1983160+ashvardanian@users.noreply.github.com>
1 parent c0de962 commit b72b0f0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cpp/test.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,6 +1101,9 @@ template <typename key_at, typename slot_at> void test_replacing_update() {
11011101
int main(int, char**) {
11021102
test_uint40();
11031103
test_cosine<float, std::int64_t, uint40_t>(10, 10);
1104+
1105+
// Non-default floating-point types may result in many compilation & rounding issues.
1106+
test_cosine<f16_t, std::int64_t, uint40_t>(10, 10);
11041107
test_cosine<bf16_t, std::int64_t, uint40_t>(10, 10);
11051108

11061109
// Test plugins, like K-Means clustering.
@@ -1126,6 +1129,7 @@ int main(int, char**) {
11261129
for (std::size_t queries_count : {1, 10})
11271130
for (std::size_t wanted_count : {1, 5}) {
11281131
test_exact_search<float>(dataset_count, queries_count, wanted_count);
1132+
test_exact_search<f16_t>(dataset_count, queries_count, wanted_count);
11291133
test_exact_search<bf16_t>(dataset_count, queries_count, wanted_count);
11301134
}
11311135

0 commit comments

Comments
 (0)