File tree Expand file tree Collapse file tree 5 files changed +125
-237
lines changed Expand file tree Collapse file tree 5 files changed +125
-237
lines changed Original file line number Diff line number Diff line change 1
1
option (ENABLE_GIT_VERSION "Build with Git metadata" OFF )
2
2
3
3
option (USE_SIMSIMD "Enable SimSIMD vector optimizations" OFF )
4
+ option (SIMSIMD_NATIVE_F16 "Enable native float16 support in SimSIMD" OFF )
4
5
option (WITH_SEARCH "Enable compilation of search module" ON )
5
6
6
7
if ("${CMAKE_SYSTEM_NAME} " STREQUAL "FreeBSD" )
Original file line number Diff line number Diff line change @@ -12,6 +12,18 @@ add_library(dfly_search_core base.cc ast_expr.cc query_driver.cc search.cc indic
12
12
target_link_libraries (dfly_search_core base redis_lib absl::strings
13
13
TRDP::reflex TRDP::uni-algo TRDP::hnswlib)
14
14
15
+ if (USE_SIMSIMD)
16
+ target_link_libraries (dfly_search_core TRDP::simsimd)
17
+ target_compile_definitions (dfly_search_core PRIVATE USE_SIMSIMD=1)
18
+
19
+ # Conditionally disable native float16 support (default behavior)
20
+ if (NOT SIMSIMD_NATIVE_F16)
21
+ target_compile_definitions (dfly_search_core PRIVATE
22
+ SIMSIMD_NATIVE_F16=0
23
+ SIMSIMD_NATIVE_BF16=0)
24
+ endif ()
25
+ endif ()
26
+
15
27
cxx_test(compressed_sorted_set_test dfly_search_core LABELS DFLY)
16
28
cxx_test(block_list_test dfly_search_core LABELS DFLY)
17
29
cxx_test(range_tree_test dfly_search_core LABELS DFLY)
@@ -22,4 +34,11 @@ cxx_test(search_test redis_test_lib dfly_search_core LABELS DFLY)
22
34
if (USE_SIMSIMD)
23
35
target_link_libraries (search_test TRDP::simsimd)
24
36
target_compile_definitions (search_test PRIVATE USE_SIMSIMD=1)
37
+
38
+ # Conditionally disable native float16 support (default behavior)
39
+ if (NOT SIMSIMD_NATIVE_F16)
40
+ target_compile_definitions (search_test PRIVATE
41
+ SIMSIMD_NATIVE_F16=0
42
+ SIMSIMD_NATIVE_BF16=0)
43
+ endif ()
25
44
endif ()
You can’t perform that action at this time.
0 commit comments