Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Faiss
Commits
28da93b4
Commit
28da93b4
authored
Aug 28, 2024
by
zhanggzh
Browse files
Update README.md
parent
541f7062
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
11 deletions
+42
-11
README.md
README.md
+42
-11
No files found.
README.md
View file @
28da93b4
# <div align="center"><strong>MMCV</strong></div>
--------------------------------------------------------------------------------
## 简介
## Faiss简介
Faiss 是一个用于高效相似性搜索和密集向量聚类的库。它提供了在各种规模的向量集合中进行搜索的算法,包括那些可能无法完全适应 RAM 的大型集合。除了搜索功能,Faiss 还包含用于评估和参数调优的支持代码
Faiss 是一个用于高效相似性搜索和密集向量聚类的库。它提供了在各种规模的向量集合中进行搜索的算法,包括那些可能无法完全适应 RAM 的大型集合。除了搜索功能,Faiss 还包含用于评估和参数调优的支持代码
## 版本约束
1.
暂不支持的官方版本或功能
**更高版本**
:暂不支持faiss1.7.2以上版本
2.
faiss软件版本配套关系
| faiss版本 | DCU适配版faiss软件包版本 | DCU加速卡型号 | DTK版本 |
| ----------- | ------------------------------------------ | -------------------------- | ------- |
| 1.7.2 | 1.7.2+das.dtk24042 | Z100、Z100L、K100、K100_AI | 24.04.2 |
## 前置条件
使用 DAS PyTorch需要参考
[
《DCU新手入门教程》
](
https://developer.hpccube.com/gitbook/dcu_tutorial/index.html
)
在主机系统安装以下组件:
-
DCU驱动程序
-
DTK
-
Docker引擎
## 安装
## 安装
组件支持
组件支持
+
Python 3.7、3.8、3.9、3.10
+
Python 3.7、3.8、3.9、3.10
...
@@ -33,7 +56,21 @@ cd faiss/python
...
@@ -33,7 +56,21 @@ cd faiss/python
python3 setup.py bdist_wheel
python3 setup.py bdist_wheel
cd dist
cd dist
pip3 install faiss-* --no-deps --force
pip3 install faiss-* --no-deps --force
2. 源码编译安装
mkdir -p build
cd build
source /opt/dtk/env.sh
export BUILD_DIR=`pwd`
export LD_LIBRARY_PATH=${BUILD_DIR}/faiss/gpu/test/:${BUILD_DIR}/faiss/:${BUILD_DIR}/lib/:$LD_LIBRARY_PATH
CXX=hipcc CC=hipcc cmake -DFAISS_ENABLE_GPU=ON -DBUILD_SHARED_LIBS=ON -DFAISS_OPT_LEVEL=avx -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_MODULE_PATH="${ROCM_PATH}/hip/cmake" -DCMAKE_INSTALL_PREFIX=${BUILD_DIR}/install -DMKL_LIBRARIES=/opt/intel/compilers_and_libraries_2020.4.304/linux/mkl/lib/intel64_lin/libmkl_rt.so ..
make && make install
```
## 验证
验证安装:
验证安装:
```
python3
python3
Python 3.10.12 (main, May 26 2024, 00:14:02) [GCC 9.4.0] on linux
Python 3.10.12 (main, May 26 2024, 00:14:02) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Type "help", "copyright", "credits" or "license" for more information.
...
@@ -43,22 +80,16 @@ Type "help", "copyright", "credits" or "license" for more information.
...
@@ -43,22 +80,16 @@ Type "help", "copyright", "credits" or "license" for more information.
>>> faiss.__dcu_version__
>>> faiss.__dcu_version__
'1.7.2+das.dtk24041'
'1.7.2+das.dtk24041'
>>>
>>>
2. 源码编译安装
mkdir -p build
cd build
source /opt/dtk/env.sh
export BUILD_DIR=`pwd`
export LD_LIBRARY_PATH=${BUILD_DIR}/faiss/gpu/test/:${BUILD_DIR}/faiss/:${BUILD_DIR}/lib/:$LD_LIBRARY_PATH
CXX=hipcc CC=hipcc cmake -DFAISS_ENABLE_GPU=ON -DBUILD_SHARED_LIBS=ON -DFAISS_OPT_LEVEL=avx -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_MODULE_PATH="${ROCM_PATH}/hip/cmake" -DCMAKE_INSTALL_PREFIX=${BUILD_DIR}/install -DMKL_LIBRARIES=/opt/intel/compilers_and_libraries_2020.4.304/linux/mkl/lib/intel64_lin/libmkl_rt.so ..
make && make install
```
```
## 单测
## 单测
```
```
cd faiss/tests
cd faiss/tests
pytest -vs
pytest -vs
cd faiss/build
cd faiss/build
ctest
ctest
```
```
## Known Issue
## Known Issue
-
无
-
无
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment