usearch 2.7.6 → 2.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CITATION.cff +1 -1
- package/Cargo.toml +1 -1
- package/README.md +1 -1
- package/conanfile.py +1 -1
- package/cpp/bench.cpp +1 -1
- package/csharp/nuget/nuget-package.props +1 -1
- package/include/usearch/index.hpp +1 -1
- package/include/usearch/index_plugins.hpp +21 -16
- package/package.json +1 -1
- package/python/lib.cpp +3 -4
- package/wasmer.toml +1 -1
package/CITATION.cff
CHANGED
package/Cargo.toml
CHANGED
package/README.md
CHANGED
package/conanfile.py
CHANGED
|
@@ -7,7 +7,7 @@ required_conan_version = ">=1.53.0"
|
|
|
7
7
|
class USearchConan(ConanFile):
|
|
8
8
|
|
|
9
9
|
name = "usearch"
|
|
10
|
-
version = '2.7.
|
|
10
|
+
version = '2.7.7'
|
|
11
11
|
license = "Apache-2.0"
|
|
12
12
|
description = "Smaller & Faster Single-File Vector Search Engine from Unum"
|
|
13
13
|
homepage = "https://github.com/unum-cloud/usearch"
|
package/cpp/bench.cpp
CHANGED
|
@@ -490,7 +490,7 @@ void run_punned(dataset_at& dataset, args_t const& args, index_config_t config,
|
|
|
490
490
|
metric_punned_t metric(dataset.dimensions(), kind, quantization);
|
|
491
491
|
index_at index = index_at::make(metric, config);
|
|
492
492
|
index.reserve(limits);
|
|
493
|
-
std::printf("-- Hardware acceleration: %s\n",
|
|
493
|
+
std::printf("-- Hardware acceleration: %s\n", index.metric().isa_name());
|
|
494
494
|
std::printf("Will benchmark in-memory\n");
|
|
495
495
|
|
|
496
496
|
single_shot(dataset, index, true);
|
|
@@ -186,20 +186,6 @@ inline bool str_equals(char const* begin, std::size_t len, char const* other_beg
|
|
|
186
186
|
return len == other_len && std::strncmp(begin, other_begin, len) == 0;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
inline char const* isa_name(simsimd_capability_t isa_kind) noexcept {
|
|
190
|
-
switch (isa_kind) {
|
|
191
|
-
case simsimd_cap_serial_k: return "serial";
|
|
192
|
-
case simsimd_cap_arm_neon_k: return "neon";
|
|
193
|
-
case simsimd_cap_arm_sve_k: return "sve";
|
|
194
|
-
case simsimd_cap_x86_avx2_k: return "avx2";
|
|
195
|
-
case simsimd_cap_x86_avx512_k: return "avx512";
|
|
196
|
-
case simsimd_cap_x86_avx2fp16_k: return "avx2+f16";
|
|
197
|
-
case simsimd_cap_x86_avx512fp16_k: return "avx512+f16";
|
|
198
|
-
case simsimd_cap_x86_avx512vpopcntdq_k: return "avx512+popcnt";
|
|
199
|
-
default: return "unknown";
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
189
|
inline std::size_t bits_per_scalar(scalar_kind_t scalar_kind) noexcept {
|
|
204
190
|
switch (scalar_kind) {
|
|
205
191
|
case scalar_kind_t::f64_k: return 64;
|
|
@@ -1283,7 +1269,10 @@ class metric_punned_t {
|
|
|
1283
1269
|
std::size_t dimensions_ = 0;
|
|
1284
1270
|
metric_kind_t metric_kind_ = metric_kind_t::unknown_k;
|
|
1285
1271
|
scalar_kind_t scalar_kind_ = scalar_kind_t::unknown_k;
|
|
1272
|
+
|
|
1273
|
+
#if USEARCH_USE_SIMSIMD
|
|
1286
1274
|
simsimd_capability_t isa_kind_ = simsimd_cap_serial_k;
|
|
1275
|
+
#endif
|
|
1287
1276
|
|
|
1288
1277
|
public:
|
|
1289
1278
|
/**
|
|
@@ -1303,7 +1292,7 @@ class metric_punned_t {
|
|
|
1303
1292
|
metric_kind_t metric_kind = metric_kind_t::l2sq_k, //
|
|
1304
1293
|
scalar_kind_t scalar_kind = scalar_kind_t::f32_k) noexcept
|
|
1305
1294
|
: raw_arg3_(dimensions), raw_arg4_(dimensions), dimensions_(dimensions), metric_kind_(metric_kind),
|
|
1306
|
-
scalar_kind_(scalar_kind)
|
|
1295
|
+
scalar_kind_(scalar_kind) {
|
|
1307
1296
|
|
|
1308
1297
|
#if USEARCH_USE_SIMSIMD
|
|
1309
1298
|
if (configure_with_simsimd())
|
|
@@ -1328,7 +1317,23 @@ class metric_punned_t {
|
|
|
1328
1317
|
inline std::size_t dimensions() const noexcept { return dimensions_; }
|
|
1329
1318
|
inline metric_kind_t metric_kind() const noexcept { return metric_kind_; }
|
|
1330
1319
|
inline scalar_kind_t scalar_kind() const noexcept { return scalar_kind_; }
|
|
1331
|
-
|
|
1320
|
+
|
|
1321
|
+
inline char const* isa_name() const noexcept {
|
|
1322
|
+
#if USEARCH_USE_SIMSIMD
|
|
1323
|
+
switch (isa_kind_) {
|
|
1324
|
+
case simsimd_cap_serial_k: return "serial";
|
|
1325
|
+
case simsimd_cap_arm_neon_k: return "neon";
|
|
1326
|
+
case simsimd_cap_arm_sve_k: return "sve";
|
|
1327
|
+
case simsimd_cap_x86_avx2_k: return "avx2";
|
|
1328
|
+
case simsimd_cap_x86_avx512_k: return "avx512";
|
|
1329
|
+
case simsimd_cap_x86_avx2fp16_k: return "avx2+f16";
|
|
1330
|
+
case simsimd_cap_x86_avx512fp16_k: return "avx512+f16";
|
|
1331
|
+
case simsimd_cap_x86_avx512vpopcntdq_k: return "avx512+popcnt";
|
|
1332
|
+
default: return "unknown";
|
|
1333
|
+
}
|
|
1334
|
+
#endif
|
|
1335
|
+
return "serial";
|
|
1336
|
+
}
|
|
1332
1337
|
|
|
1333
1338
|
inline std::size_t bytes_per_vector() const noexcept {
|
|
1334
1339
|
return divide_round_up<CHAR_BIT>(dimensions_ * bits_per_scalar(scalar_kind_));
|
package/package.json
CHANGED
package/python/lib.cpp
CHANGED
|
@@ -918,7 +918,7 @@ PYBIND11_MODULE(compiled, m) {
|
|
|
918
918
|
m.def(
|
|
919
919
|
"hardware_acceleration",
|
|
920
920
|
[](scalar_kind_t scalar_kind, std::size_t dimensions, metric_kind_t metric_kind) -> py::str {
|
|
921
|
-
return
|
|
921
|
+
return metric_t(dimensions, metric_kind, scalar_kind).isa_name();
|
|
922
922
|
},
|
|
923
923
|
py::kw_only(), //
|
|
924
924
|
py::arg("dtype") = scalar_kind_t::f32_k, //
|
|
@@ -1087,9 +1087,8 @@ PYBIND11_MODULE(compiled, m) {
|
|
|
1087
1087
|
py::arg("metric_pointer") = 0 //
|
|
1088
1088
|
);
|
|
1089
1089
|
|
|
1090
|
-
i.def_property_readonly("hardware_acceleration",
|
|
1091
|
-
|
|
1092
|
-
});
|
|
1090
|
+
i.def_property_readonly("hardware_acceleration",
|
|
1091
|
+
[](dense_index_py_t const& index) -> py::str { return index.metric().isa_name(); });
|
|
1093
1092
|
|
|
1094
1093
|
i.def("contains_one", &dense_index_py_t::contains);
|
|
1095
1094
|
i.def("count_one", &dense_index_py_t::count);
|