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 .github/workflows/nightly_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y lcov
sudo apt-get install -y lcov libaio-dev
shell: bash

- name: Install dependencies
Expand Down
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ endif()
message(STATUS "RABITQ_ARCH_FLAG: ${RABITQ_ARCH_FLAG}")

# DiskAnn support (Linux x86_64 only, requires libaio)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|i686|i386" AND NOT ANDROID AND NOT IOS)
if(NOT ENABLE_DISKANN)
set(DISKANN_SUPPORTED OFF)
add_definitions(-DDISKANN_SUPPORTED=0)
message(STATUS "DiskAnn support disabled by ENABLE_DISKANN=OFF")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

这里还是不太对吧,默认行为应该是要判断当前编译环境是否有libaio的存在,如果存在,那么默认编译diskann;如果不存在,那么不编译diskann;

如果用户强制指定编译diskann,那么就需要检查当前环境是否存在libaio,如果不存在则报错

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

构建时都是编译选项开关控制,自动检测只有运行期才有

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

既然运行期可以加自动检测,为什么不能在编译期间加自动检测呢?否则默认配置的编译不就报错了吗,用户体验不好?

elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|i686|i386" AND NOT ANDROID AND NOT IOS)
set(DISKANN_SUPPORTED ON)
add_definitions(-DDISKANN_SUPPORTED=1)
else()
Expand Down
3 changes: 3 additions & 0 deletions cmake/option.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ option(ENABLE_ARMV8.6A "Enable ARMv8.6-a architecture" OFF)
## OpenMP option
option(ENABLE_OPENMP "Enable OpenMP support" OFF)

## DiskAnn index support (requires libaio-dev at compile time on Linux)
option(ENABLE_DISKANN "Enable DiskAnn index support (requires libaio-dev)" ON)

## Treat warnings as errors (for CI)
option(ENABLE_WERROR "Treat compiler warnings as errors in strict targets" OFF)

Expand Down
Loading