mirror of https://github.com/milvus-io/milvus.git
Merge remote-tracking branch 'upstream/0.5.0' into branch-0.5.0-yk
Former-commit-id: e2b4b40f924f3adaab8b801102ae7bdfdd53781epull/191/head
commit
e7dd603dba
|
@ -15,5 +15,3 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
# ipc-adapter-test.cc
|
||||
# memory-pool-test.cc
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
name: "\U0001F41B Bug report"
|
||||
about: Create a bug report to help us improve Milvus
|
||||
title: "[BUG]"
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**Steps/Code to reproduce behavior**
|
||||
Follow this [guide](http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) to craft a minimal bug report. This helps us reproduce the issue you're having and resolve the issue more quickly.
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Environment details**
|
||||
- Hardware/Softward conditions (OS, CPU, GPU, Memory)
|
||||
- Method of installation (Docker, or from source)
|
||||
- Milvus version (v0.3.1, or v0.4.0)
|
||||
- Milvus configuration (Settings you made in `server_config.yaml`)
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
name: "\U0001F4DD Documentation request"
|
||||
about: Report incorrect or needed documentation
|
||||
title: "[DOC]"
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Report incorrect documentation
|
||||
|
||||
**Location of incorrect documentation**
|
||||
Provide links and line numbers if applicable.
|
||||
|
||||
**Describe the problems or issues found in the documentation**
|
||||
A clear and concise description of what you found to be incorrect.
|
||||
|
||||
**Steps taken to verify documentation is incorrect**
|
||||
List any steps you have taken:
|
||||
|
||||
**Suggested fix for documentation**
|
||||
Detail proposed changes to fix the documentation if you have any.
|
||||
|
||||
---
|
||||
|
||||
## Report needed documentation
|
||||
|
||||
**Report needed documentation**
|
||||
A clear and concise description of what documentation you believe it is needed and why.
|
||||
|
||||
**Describe the documentation you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Steps taken to search for needed documentation**
|
||||
List any steps you have taken:
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
name: "\U0001F680 Feature request"
|
||||
about: Suggest an idea for Milvus
|
||||
title: "[FEATURE]"
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. E.g. I wish I could use Milvus to do [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context, code examples, or references to existing implementations about the feature request here.
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
name: "\U0001F914 General question"
|
||||
about: Ask a general question about Milvus
|
||||
title: "[QUESTION]"
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**What is your question?**
|
|
@ -43,13 +43,13 @@ Please mark all change in change log and use the ticket from JIRA.
|
|||
- MS-608 - Update TODO names
|
||||
- MS-609 - Update task construct function
|
||||
- MS-611 - Add resources validity check in ResourceMgr
|
||||
- MS-614 - Preload table at startup
|
||||
- MS-619 - Add optimizer class in scheduler
|
||||
- MS-626 - Refactor DataObj to support cache any type data
|
||||
- MS-648 - Improve unittest
|
||||
- MS-655 - Upgrade SPTAG
|
||||
|
||||
## New Feature
|
||||
- MS-614 - Preload table at startup
|
||||
- MS-627 - Integrate new index: IVFSQHybrid
|
||||
- MS-631 - IVFSQ8H Index support
|
||||
- MS-636 - Add optimizer in scheduler for FAISS_IVFSQ8H
|
||||
|
@ -67,7 +67,8 @@ Please mark all change in change log and use the ticket from JIRA.
|
|||
- MS-610 - Change error code base value from hex to decimal
|
||||
- MS-624 - Re-organize project directory for open-source
|
||||
- MS-635 - Add compile option to support customized faiss
|
||||
|
||||
- MS-660 - add ubuntu_build_deps.sh
|
||||
|
||||
# Milvus 0.4.0 (2019-09-12)
|
||||
|
||||
## Bug
|
|
@ -1,20 +1,18 @@
|
|||
# Contributing to Milvus
|
||||
|
||||
First of all, thanks for taking the time to contribute to Milvus! It's people like you that help Milvus come to fruition.
|
||||
First of all, thanks for taking the time to contribute to Milvus! It's people like you that help Milvus come to fruition. :tada:
|
||||
|
||||
The following are a set of guidelines for contributing to Milvus. Following these guidelines helps contributing to this project easy and transparent. These are mostly guideline, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
|
||||
|
||||
As for everything else in the project, the contributions to Milvus are governed by our [Code of Conduct](CODE OF CONDUCT.md).
|
||||
|
||||
TOC
|
||||
As for everything else in the project, the contributions to Milvus are governed by our [Code of Conduct](CODE_OF_CONDUCT.md).
|
||||
|
||||
## Contribution Checklist
|
||||
|
||||
Before you make any contributions, make sure you follow this list.
|
||||
|
||||
- Read [Contributing to Milvus](CONTRIBUTING.md).
|
||||
- Check if the changes are consistent with the [coding style](CONTRIBUTING.md#coding-style).
|
||||
- Run [unit tests](CONTRIBUTING.md#run-unit-test).
|
||||
- Check if the changes are consistent with the [coding style](CONTRIBUTING.md#coding-style), and format your code accordingly.
|
||||
- Run [unit tests](CONTRIBUTING.md#run-unit-test-with-code-coverage) and check your code coverage rate.
|
||||
|
||||
## What contributions can I make?
|
||||
|
||||
|
@ -28,10 +26,29 @@ Contributions to Milvus fall into the following categories.
|
|||
|
||||
### Contributing code
|
||||
|
||||
If you have improvements to Milvus, send us your pull requests! For those just getting started, GitHub has a [how-to](https://help.github.com/en/articles/about-pull-requests).
|
||||
If you have improvements to Milvus, send us your pull requests! For those just getting started, see [GitHub workflow](#github-workflow).
|
||||
|
||||
The Milvus team members will review your pull requests, and once it is accepted, it will be given a `ready to merge` label. This means we are working on submitting your pull request to the internal repository. After the change has been submitted internally, your pull request will be merged automatically on GitHub.
|
||||
|
||||
### GitHub workflow
|
||||
|
||||
Please create a new branch from an up-to-date master on your fork.
|
||||
|
||||
1. Fork the repository on GitHub.
|
||||
2. Clone your fork to your local machine with `git clone git@github.com:<yourname>/milvus-io/milvus.git`.
|
||||
3. Create a branch with `git checkout -b my-topic-branch`.
|
||||
4. Make your changes, commit, then push to to GitHub with `git push --set-upstream origin my-topic-branch`.
|
||||
5. Visit GitHub and make your pull request.
|
||||
|
||||
If you have an existing local repository, please update it before you start, to minimize the chance of merge conflicts.
|
||||
|
||||
```shell
|
||||
git remote add upstream git@github.com:milvus-io/milvus.git
|
||||
git checkout master
|
||||
git pull upstream master
|
||||
git checkout -b my-topic-branch
|
||||
```
|
||||
|
||||
### General guidelines
|
||||
|
||||
Before sending your pull requests for review, make sure your changes are consistent with the guidelines and follow the Milvus coding style.
|
||||
|
@ -51,15 +68,51 @@ And we made the following changes based on the guide:
|
|||
- 120-character line length
|
||||
- Camel-Cased file names
|
||||
|
||||
### Format code
|
||||
|
||||
## Run unit test
|
||||
|
||||
We use Google Test framework for test running.
|
||||
To run unit test for Milvus under C++, please use the following command:
|
||||
|
||||
Install clang-format
|
||||
```shell
|
||||
# Run unit test for Milvus
|
||||
$ ./build.sh -u
|
||||
$ sudo apt-get install clang-format
|
||||
$ rm cmake_build/CMakeCache.txt
|
||||
```
|
||||
Check code style
|
||||
```shell
|
||||
$ ./build.sh -l
|
||||
```
|
||||
To format the code
|
||||
```shell
|
||||
$ cd cmake_build
|
||||
$ make clang-format
|
||||
```
|
||||
|
||||
## Run unit test with code coverage
|
||||
|
||||
Before submitting your PR, make sure you have run unit test, and your code coverage rate is >= 90%.
|
||||
|
||||
Install lcov
|
||||
```shell
|
||||
$ sudo apt-get install lcov
|
||||
```
|
||||
Run unit test and generate code for code coverage check
|
||||
```shell
|
||||
$ ./build.sh -u -c
|
||||
```
|
||||
|
||||
Run MySQL docker
|
||||
```shell
|
||||
docker pull mysql:latest
|
||||
docker run -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -d mysql:latest
|
||||
```
|
||||
|
||||
Run code coverage
|
||||
|
||||
```shell
|
||||
$ ./coverage.sh -u root -p 123456 -t 127.0.0.1
|
||||
```
|
||||
|
||||
Or start your own MySQL server, and then run code coverage
|
||||
|
||||
```shell
|
||||
$ ./coverage.sh -u ${MYSQL_USERNAME} -p ${MYSQL_PASSWORD} -t ${MYSQL_SERVER_IP}
|
||||
```
|
||||
|
|
@ -0,0 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -0,0 +1,168 @@
|
|||

|
||||
|
||||

|
||||

|
||||
|
||||
- [Slack Community](https://join.slack.com/t/milvusio/shared_invite/enQtNzY1OTQ0NDI3NjMzLWNmYmM1NmNjOTQ5MGI5NDhhYmRhMGU5M2NhNzhhMDMzY2MzNDdlYjM5ODQ5MmE3ODFlYzU3YjJkNmVlNDQ2ZTk)
|
||||
- [Twitter](https://twitter.com/milvusio)
|
||||
- [Blog](https://www.milvus.io/blog/)
|
||||
- [CSDN](https://zilliz.blog.csdn.net/)
|
||||
- [中文官网](https://www.milvus.io/zh-CN/)
|
||||
|
||||
|
||||
# Welcome to Milvus
|
||||
|
||||
Firstly, welcome, and thanks for your interest in [Milvus](https://milvus.io)! No matter who you are, what you do, we greatly appreciate your contribution to help us reinvent data science with Milvus.
|
||||
|
||||
## What is Milvus
|
||||
|
||||
Milvus is an open source vector search engine that supports similarity search of large-scale vectors. Built on optimized indexing algorithm, it is compatible with major AI/ML models.
|
||||
|
||||
Milvus provides stable Python, C++ and Java APIs.
|
||||
|
||||
Keep up-to-date with newest releases and latest updates by reading Milvus [release notes](https://milvus.io/docs/en/Releases/v0.4.0/).
|
||||
|
||||
- GPU-accelerated search engine
|
||||
|
||||
Milvus is designed for the largest scale of vector index. CPU/GPU heterogeneous computing architecture allows you to process data at a speed 1000 times faster.
|
||||
|
||||
- Intelligent index
|
||||
|
||||
With a "Decide Your Own Algorithm" approach, you can embed machine learning and advanced algorithms into Milvus without the headache of complex data engineering or migrating data between disparate systems. Milvus is built on optimized indexing algorithm based on quantization indexing, tree-based and graph indexing methods.
|
||||
|
||||
- Strong scalability
|
||||
|
||||
The data is stored and computed on a distributed architecture. This lets you scale data sizes up and down without redesigning the system.
|
||||
|
||||
## Architecture
|
||||

|
||||
|
||||
## Get started
|
||||
|
||||
### Install using docker
|
||||
|
||||
Use Docker to install Milvus is a breeze. See the [Milvus install guide](https://milvus.io/docs/en/userguide/install_milvus/) for details.
|
||||
|
||||
### Build from source
|
||||
|
||||
#### Software requirements
|
||||
|
||||
- Ubuntu 18.04 or higher
|
||||
- CMake 3.14 or higher
|
||||
- CUDA 10.0 or higher
|
||||
- NVIDIA driver 418 or higher
|
||||
|
||||
#### Compilation
|
||||
|
||||
##### Step 1 Install dependencies
|
||||
|
||||
```shell
|
||||
$ cd [Milvus sourcecode path]/core
|
||||
./ubuntu_build_deps.sh
|
||||
```
|
||||
|
||||
##### Step 2 Build
|
||||
|
||||
```shell
|
||||
$ cd [Milvus sourcecode path]/core
|
||||
$ ./build.sh -t Debug
|
||||
or
|
||||
$ ./build.sh -t Release
|
||||
```
|
||||
|
||||
When the build is completed, all the stuff that you need in order to run Milvus will be installed under `[Milvus root path]/core/milvus`.
|
||||
|
||||
#### Launch Milvus server
|
||||
|
||||
```shell
|
||||
$ cd [Milvus root path]/core/milvus
|
||||
```
|
||||
|
||||
Add `lib/` directory to `LD_LIBRARY_PATH`
|
||||
|
||||
```
|
||||
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/milvus/lib
|
||||
```
|
||||
|
||||
Then start Milvus server:
|
||||
|
||||
```
|
||||
$ cd scripts
|
||||
$ ./start_server.sh
|
||||
```
|
||||
|
||||
To stop Milvus server, run:
|
||||
|
||||
```shell
|
||||
$ ./stop_server.sh
|
||||
```
|
||||
|
||||
To edit Milvus settings in `conf/server_config.yaml` and `conf/log_config.conf`, please read [Milvus Configuration](https://www.milvus-io/docs/master/reference/milvus_config.md).
|
||||
|
||||
### Try your first Milvus program
|
||||
|
||||
#### Run Python example code
|
||||
|
||||
Make sure [Python 3.4](https://www.python.org/downloads/) or higher is already installed and in use.
|
||||
|
||||
Install Milvus Python SDK.
|
||||
|
||||
```shell
|
||||
# Install Milvus Python SDK
|
||||
$ pip install pymilvus==0.2.0
|
||||
```
|
||||
|
||||
Create a new file `example.py`, and add [Python example code](https://github.com/milvus-io/pymilvus/blob/master/examples/AdvancedExample.py) to it.
|
||||
|
||||
Run the example code.
|
||||
|
||||
```python
|
||||
# Run Milvus Python example
|
||||
$ python3 example.py
|
||||
```
|
||||
|
||||
#### Run C++ example code
|
||||
|
||||
```shell
|
||||
# Run Milvus C++ example
|
||||
$ cd [Milvus root path]/core/milvus/bin
|
||||
$ ./sdk_simple
|
||||
```
|
||||
|
||||
#### Run Java example code
|
||||
Make sure Java 8 or higher is already installed.
|
||||
|
||||
Refer to [this link](https://github.com/milvus-io/milvus-sdk-java/tree/master/examples) for the example code.
|
||||
|
||||
## Contribution guidelines
|
||||
|
||||
Contributions are welcomed and greatly appreciated. If you want to contribute to Milvus, please read our [contribution guidelines](CONTRIBUTING.md). This project adheres to the [code of conduct](CODE_OF_CONDUCT.md) of Milvus. By participating, you are expected to uphold this code.
|
||||
|
||||
We use [GitHub issues](https://github.com/milvus-io/milvus/issues/new/choose) to track issues and bugs. For general questions and public discussions, please join our community.
|
||||
|
||||
## Join the Milvus community
|
||||
|
||||
To connect with other users and contributors, welcome to join our [slack channel](https://join.slack.com/t/milvusio/shared_invite/enQtNzY1OTQ0NDI3NjMzLWNmYmM1NmNjOTQ5MGI5NDhhYmRhMGU5M2NhNzhhMDMzY2MzNDdlYjM5ODQ5MmE3ODFlYzU3YjJkNmVlNDQ2ZTk).
|
||||
|
||||
## Milvus Roadmap
|
||||
|
||||
Please read our [roadmap](https://milvus.io/docs/en/roadmap/) to learn about upcoming features.
|
||||
|
||||
## Resources
|
||||
|
||||
[Milvus official website](https://www.milvus.io)
|
||||
|
||||
[Milvus docs](https://www.milvus.io/docs/en/userguide/install_milvus/)
|
||||
|
||||
[Milvus bootcamp](https://github.com/milvus-io/bootcamp)
|
||||
|
||||
[Milvus blog](https://www.milvus.io/blog/)
|
||||
|
||||
[Milvus CSDN](https://zilliz.blog.csdn.net/)
|
||||
|
||||
[Milvus roadmap](https://milvus.io/docs/en/roadmap/)
|
||||
|
||||
|
||||
## License
|
||||
|
||||
[Apache 2.0 license](milvus-io/milvus/LICENSE.md)
|
|
@ -15,9 +15,9 @@ container('milvus-build-env') {
|
|||
&& export JFROG_USER_NAME='${USERNAME}' \
|
||||
&& export JFROG_PASSWORD='${PASSWORD}' \
|
||||
&& export FAISS_URL='http://192.168.1.105:6060/jinhai/faiss/-/archive/branch-0.2.1/faiss-branch-0.2.1.tar.gz' \
|
||||
&& ./build.sh -t ${params.BUILD_TYPE} -j -u -c"
|
||||
&& ./build.sh -t ${params.BUILD_TYPE} -d /opt/milvus -j -u -c"
|
||||
|
||||
sh "./coverage.sh -u root -p Fantast1c -t 192.168.1.194"
|
||||
sh "./coverage.sh -u root -p 123456 -t 192.168.1.194"
|
||||
}
|
||||
}
|
||||
} catch (exc) {
|
||||
|
|
|
@ -10,8 +10,12 @@ container('milvus-build-env') {
|
|||
sh "git config --global user.name \"test\""
|
||||
withCredentials([usernamePassword(credentialsId: "${params.JFROG_USER}", usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
|
||||
sh "./build.sh -l"
|
||||
sh "export JFROG_ARTFACTORY_URL='${params.JFROG_ARTFACTORY_URL}' && export JFROG_USER_NAME='${USERNAME}' && export JFROG_PASSWORD='${PASSWORD}' && ./build.sh -t ${params.BUILD_TYPE} -j"
|
||||
sh "./coverage.sh -u root -p Fantast1c -t 192.168.1.194"
|
||||
sh "rm -rf cmake_build"
|
||||
sh "export JFROG_ARTFACTORY_URL='${params.JFROG_ARTFACTORY_URL}' \
|
||||
&& export JFROG_USER_NAME='${USERNAME}' \
|
||||
&& export JFROG_PASSWORD='${PASSWORD}' \
|
||||
&& export FAISS_URL='http://192.168.1.105:6060/jinhai/faiss/-/archive/branch-0.2.1/faiss-branch-0.2.1.tar.gz' \
|
||||
&& ./build.sh -t ${params.BUILD_TYPE} -j -d /opt/milvus"
|
||||
}
|
||||
}
|
||||
} catch (exc) {
|
||||
|
|
|
@ -7,5 +7,4 @@ base.info
|
|||
output.info
|
||||
output_new.info
|
||||
server.info
|
||||
thirdparty/knowhere/
|
||||
*.pyc
|
||||
|
|
247
core/README.md
247
core/README.md
|
@ -1,247 +0,0 @@
|
|||
- [Slack Community](https://join.slack.com/t/milvusio/shared_invite/enQtNzY1OTQ0NDI3NjMzLWNmYmM1NmNjOTQ5MGI5NDhhYmRhMGU5M2NhNzhhMDMzY2MzNDdlYjM5ODQ5MmE3ODFlYzU3YjJkNmVlNDQ2ZTk)
|
||||
- [Blog](https://www.milvus.io/blog/)
|
||||
|
||||
# Welcome to Milvus
|
||||
|
||||
Firstly, welcome, and thanks for your interest in [Milvus](https://milvus.io)! No matter who you are, what you do, we greatly appreciate your contribution to help us reinvent data science with Milvus.
|
||||
|
||||
## What is Milvus
|
||||
|
||||
Milvus is an open source vector search engine that supports similarity search of large-scale vectors. Built on optimized indexing algorithm, it is compatible with major AI/ML models.
|
||||
|
||||
Milvus was developed by ZILLIZ, a tech startup that intends to reinvent data science, with the purpose of providing enterprises with efficient and scalable similarity search and analysis of feature vectors and unstructured data.
|
||||
|
||||
Milvus provides stable Python, C++ and Java APIs.
|
||||
|
||||
Keep up-to-date with newest releases and latest updates by reading Milvus [release notes](https://milvus.io/docs/en/Releases/v0.4.0/).
|
||||
|
||||
- GPU-accelerated search engine
|
||||
|
||||
Milvus is designed for the largest scale of vector index. CPU/GPU heterogeneous computing architecture allows you to process data at a speed 1000 times faster.
|
||||
|
||||
- Intelligent index
|
||||
|
||||
With a “Decide Your Own Algorithm” approach, you can embed machine learning and advanced algorithms into Milvus without the headache of complex data engineering or migrating data between disparate systems. Milvus is built on optimized indexing algorithm based on quantization indexing, tree-based and graph indexing methods.
|
||||
|
||||
- Strong scalability
|
||||
|
||||
The data is stored and computed on a distributed architecture. This lets you scale data sizes up and down without redesigning the system.
|
||||
|
||||
## Architecture
|
||||

|
||||
|
||||
## Get started
|
||||
|
||||
### Install and start Milvus server
|
||||
|
||||
#### Use Docker
|
||||
|
||||
Use Docker to install Milvus is a breeze. See the [Milvus install guide](https://milvus.io/docs/en/userguide/install_milvus/) for details.
|
||||
|
||||
#### Use source code
|
||||
|
||||
##### Compilation
|
||||
|
||||
###### Step 1 Install necessary tools
|
||||
|
||||
```shell
|
||||
# Install tools
|
||||
Centos7 :
|
||||
$ yum install gfortran qt4 flex bison
|
||||
$ yum install mysql-devel mysql
|
||||
|
||||
Ubuntu 16.04 or 18.04:
|
||||
$ sudo apt-get install gfortran qt4-qmake flex bison
|
||||
$ sudo apt-get install libmysqlclient-dev mysql-client
|
||||
```
|
||||
|
||||
Verify the existence of `libmysqlclient_r.so`:
|
||||
|
||||
```shell
|
||||
# Verify existence
|
||||
$ locate libmysqlclient_r.so
|
||||
```
|
||||
|
||||
If not, you need to create a symbolic link:
|
||||
|
||||
```shell
|
||||
# Locate libmysqlclient.so
|
||||
$ sudo updatedb
|
||||
$ locate libmysqlclient.so
|
||||
|
||||
# Create symbolic link
|
||||
$ sudo ln -s /path/to/libmysqlclient.so /path/to/libmysqlclient_r.so
|
||||
```
|
||||
|
||||
###### Step 2 Build
|
||||
|
||||
```shell
|
||||
$ cd [Milvus sourcecode path]/core
|
||||
$ ./build.sh -t Debug
|
||||
or
|
||||
$ ./build.sh -t Release
|
||||
```
|
||||
|
||||
When the build is completed, all the stuff that you need in order to run Milvus will be installed under `[Milvus root path]/core/milvus`.
|
||||
|
||||
If you encounter the following error message,
|
||||
`protocol https not supported or disabled in libcurl`
|
||||
|
||||
please reinstall CMake with curl:
|
||||
|
||||
1. Install curl development files:
|
||||
```shell
|
||||
CentOS 7:
|
||||
$ yum install curl-devel
|
||||
Ubuntu 16.04 or 18.04:
|
||||
$ sudo apt-get install libcurl4-openssl-dev
|
||||
```
|
||||
|
||||
2. Install [CMake 3.14](https://github.com/Kitware/CMake/releases/download/v3.14.6/cmake-3.14.6.tar.gz):
|
||||
```shell
|
||||
$ ./bootstrap --system-curl
|
||||
$ make
|
||||
$ sudo make install
|
||||
```
|
||||
|
||||
##### code format and linting
|
||||
Install clang-format and clang-tidy
|
||||
```shell
|
||||
CentOS 7:
|
||||
$ yum install clang
|
||||
Ubuntu 16.04:
|
||||
$ sudo apt-get install clang-tidy
|
||||
$ sudo su
|
||||
$ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
$ apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main"
|
||||
$ apt-get update
|
||||
$ apt-get install clang-format-6.0
|
||||
Ubuntu 18.04:
|
||||
$ sudo apt-get install clang-tidy clang-format
|
||||
|
||||
$ rm cmake_build/CMakeCache.txt
|
||||
```
|
||||
Check code style
|
||||
```shell
|
||||
$ ./build.sh -l
|
||||
```
|
||||
To format the code
|
||||
```shell
|
||||
$ cd cmake_build
|
||||
$ make clang-format
|
||||
```
|
||||
|
||||
##### Run unit test
|
||||
|
||||
```shell
|
||||
$ ./build.sh -u
|
||||
```
|
||||
|
||||
##### Run code coverage
|
||||
Install lcov
|
||||
```shell
|
||||
CentOS 7:
|
||||
$ yum install lcov
|
||||
Ubuntu 16.04 or 18.04:
|
||||
$ sudo apt-get install lcov
|
||||
```
|
||||
```shell
|
||||
$ ./build.sh -u -c
|
||||
```
|
||||
Run mysql docker
|
||||
```shell
|
||||
docker pull mysql:latest
|
||||
docker run -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -d mysql:latest
|
||||
```
|
||||
Run code coverage
|
||||
```shell
|
||||
$ ./coverage.sh -u root -p 123456 -t 127.0.0.1
|
||||
```
|
||||
|
||||
##### Launch Milvus server
|
||||
|
||||
```shell
|
||||
$ cd [Milvus root path]/core/milvus
|
||||
```
|
||||
|
||||
Add `lib/` directory to `LD_LIBRARY_PATH`
|
||||
|
||||
```
|
||||
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/milvus/lib
|
||||
```
|
||||
|
||||
Then start Milvus server:
|
||||
|
||||
```
|
||||
$ cd scripts
|
||||
$ ./start_server.sh
|
||||
```
|
||||
|
||||
To stop Milvus server, run:
|
||||
|
||||
```shell
|
||||
$ ./stop_server.sh
|
||||
```
|
||||
|
||||
To edit Milvus settings in `conf/server_config.yaml` and `conf/log_config.conf`, please read [Milvus Configuration](https://www.milvus-io/docs/master/reference/milvus_config.md).
|
||||
|
||||
### Try your first Milvus program
|
||||
|
||||
#### Run Python example code
|
||||
|
||||
Make sure [Python 3.4](https://www.python.org/downloads/) or higher is already installed and in use.
|
||||
|
||||
Install Milvus Python SDK.
|
||||
|
||||
```shell
|
||||
# Install Milvus Python SDK
|
||||
$ pip install pymilvus==0.2.0
|
||||
```
|
||||
|
||||
Create a new file `example.py`, and add [Python example code](https://github.com/milvus-io/pymilvus/blob/branch-0.3.1/examples/AdvancedExample.py) to it.
|
||||
|
||||
Run the example code.
|
||||
|
||||
```python
|
||||
# Run Milvus Python example
|
||||
$ python3 example.py
|
||||
```
|
||||
|
||||
#### Run C++ example code
|
||||
|
||||
```shell
|
||||
# Run Milvus C++ example
|
||||
$ cd [Milvus root path]/core/milvus/bin
|
||||
$ ./sdk_simple
|
||||
```
|
||||
|
||||
## Contribution guidelines
|
||||
|
||||
Contributions are welcomed and greatly appreciated. If you want to contribute to Milvus, please read our [contribution guidelines](CONTRIBUTING.md). This project adheres to the [code of conduct](CODE OF CONDUCT.md) of Milvus. By participating, you are expected to uphold this code.
|
||||
|
||||
We use [GitHub issues](https://github.com/milvus-io/milvus/issues) to track issues and bugs. For general questions and public discussions, please join our community.
|
||||
|
||||
## Join the Milvus community
|
||||
|
||||
To connect with other users and contributors, welcome to join our [slack channel](https://join.slack.com/t/milvusio/shared_invite/enQtNzY1OTQ0NDI3NjMzLWNmYmM1NmNjOTQ5MGI5NDhhYmRhMGU5M2NhNzhhMDMzY2MzNDdlYjM5ODQ5MmE3ODFlYzU3YjJkNmVlNDQ2ZTk).
|
||||
|
||||
## Milvus Roadmap
|
||||
|
||||
Please read our [roadmap](https://milvus.io/docs/en/roadmap/) to learn about upcoming features.
|
||||
|
||||
## Resources
|
||||
|
||||
[Milvus official website](https://www.milvus.io)
|
||||
|
||||
[Milvus docs](https://www.milvus.io/docs/en/QuickStart/)
|
||||
|
||||
[Milvus blog](https://www.milvus.io/blog/)
|
||||
|
||||
[Milvus CSDN](https://mp.csdn.net/mdeditor/100041006#)
|
||||
|
||||
[Milvus roadmap](https://milvus.io/docs/en/roadmap/)
|
||||
|
||||
|
||||
## License
|
||||
|
||||
[Apache 2.0 license](milvus-io/milvus/LICENSE.md)
|
|
@ -1,11 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
BUILD_OUTPUT_DIR="cmake_build"
|
||||
BUILD_TYPE="Debug"
|
||||
BUILD_UNITTEST="OFF"
|
||||
INSTALL_PREFIX=$(pwd)/milvus
|
||||
MAKE_CLEAN="OFF"
|
||||
BUILD_COVERAGE="OFF"
|
||||
DB_PATH="/opt/milvus"
|
||||
DB_PATH="/tmp/milvus"
|
||||
PROFILING="OFF"
|
||||
USE_JFROG_CACHE="OFF"
|
||||
RUN_CPPLINT="OFF"
|
||||
|
@ -40,8 +41,8 @@ do
|
|||
RUN_CPPLINT="ON"
|
||||
;;
|
||||
r)
|
||||
if [[ -d cmake_build ]]; then
|
||||
rm ./cmake_build -r
|
||||
if [[ -d ${BUILD_OUTPUT_DIR} ]]; then
|
||||
rm ./${BUILD_OUTPUT_DIR} -r
|
||||
MAKE_CLEAN="ON"
|
||||
fi
|
||||
;;
|
||||
|
@ -62,7 +63,7 @@ do
|
|||
|
||||
parameter:
|
||||
-p: install prefix(default: $(pwd)/milvus)
|
||||
-d: db path(default: /opt/milvus)
|
||||
-d: db data path(default: /tmp/milvus)
|
||||
-t: build type(default: Debug)
|
||||
-u: building unit test options(default: OFF)
|
||||
-l: run cpplint, clang-format and clang-tidy(default: OFF)
|
||||
|
@ -84,11 +85,11 @@ usage:
|
|||
esac
|
||||
done
|
||||
|
||||
if [[ ! -d cmake_build ]]; then
|
||||
mkdir cmake_build
|
||||
if [[ ! -d ${BUILD_OUTPUT_DIR} ]]; then
|
||||
mkdir ${BUILD_OUTPUT_DIR}
|
||||
fi
|
||||
|
||||
cd cmake_build
|
||||
cd ${BUILD_OUTPUT_DIR}
|
||||
|
||||
CMAKE_CMD="cmake \
|
||||
-DBUILD_UNIT_TEST=${BUILD_UNITTEST} \
|
||||
|
@ -114,6 +115,7 @@ if [[ ${RUN_CPPLINT} == "ON" ]]; then
|
|||
make lint
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR! cpplint check failed"
|
||||
rm -f CMakeCache.txt
|
||||
exit 1
|
||||
fi
|
||||
echo "cpplint check passed!"
|
||||
|
@ -122,6 +124,7 @@ if [[ ${RUN_CPPLINT} == "ON" ]]; then
|
|||
make check-clang-format
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR! clang-format check failed"
|
||||
rm -f CMakeCache.txt
|
||||
exit 1
|
||||
fi
|
||||
echo "clang-format check passed!"
|
||||
|
@ -130,9 +133,12 @@ if [[ ${RUN_CPPLINT} == "ON" ]]; then
|
|||
# make check-clang-tidy
|
||||
# if [ $? -ne 0 ]; then
|
||||
# echo "ERROR! clang-tidy check failed"
|
||||
# rm -f CMakeCache.txt
|
||||
# exit 1
|
||||
# fi
|
||||
# echo "clang-tidy check passed!"
|
||||
|
||||
rm -f CMakeCache.txt
|
||||
else
|
||||
# compile and build
|
||||
make -j 4 || exit 1
|
||||
|
|
|
@ -56,7 +56,7 @@ define_option(MILVUS_VERBOSE_THIRDPARTY_BUILD
|
|||
"Show output from ExternalProjects rather than just logging to files" ON)
|
||||
|
||||
define_option(MILVUS_BOOST_VENDORED "Use vendored Boost instead of existing Boost. \
|
||||
Note that this requires linking Boost statically" ON)
|
||||
Note that this requires linking Boost statically" OFF)
|
||||
|
||||
define_option(MILVUS_BOOST_HEADER_ONLY "Use only BOOST headers" OFF)
|
||||
|
||||
|
|
|
@ -268,7 +268,8 @@ if(DEFINED ENV{MILVUS_BOOST_URL})
|
|||
else()
|
||||
string(REPLACE "." "_" BOOST_VERSION_UNDERSCORES ${BOOST_VERSION})
|
||||
set(BOOST_SOURCE_URL
|
||||
"https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_UNDERSCORES}.tar.gz")
|
||||
"https://nchc.dl.sourceforge.net/project/boost/boost/${BOOST_VERSION}/boost_${BOOST_VERSION_UNDERSCORES}.tar.gz")
|
||||
#"https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_UNDERSCORES}.tar.gz")
|
||||
endif()
|
||||
set(BOOST_MD5 "fea771fe8176828fabf9c09242ee8c26")
|
||||
|
||||
|
|
|
@ -30,6 +30,8 @@ metric_config:
|
|||
cache_config:
|
||||
cpu_cache_capacity: 16 # GB, CPU memory used for cache
|
||||
cpu_cache_threshold: 0.85 # percentage of data that will be kept when cache cleanup is triggered
|
||||
gpu_cache_capacity: 4 # GB, GPU memory used for cache
|
||||
gpu_cache_threshold: 0.85 # percentage of data that will be kept when cache cleanup is triggered
|
||||
cache_insert_data: false # whether to load inserted data into cache
|
||||
|
||||
engine_config:
|
||||
|
|
|
@ -24,11 +24,11 @@ include_directories(${CUDA_TOOLKIT_ROOT_DIR}/include)
|
|||
include_directories(${MILVUS_ENGINE_SRC}/grpc/gen-status)
|
||||
include_directories(${MILVUS_ENGINE_SRC}/grpc/gen-milvus)
|
||||
|
||||
#this statement must put here, since the CORE_INCLUDE_DIRS is defined in code/CMakeList.txt
|
||||
#this statement must put here, since the INDEX_INCLUDE_DIRS is defined in code/CMakeList.txt
|
||||
add_subdirectory(index)
|
||||
|
||||
set(CORE_INCLUDE_DIRS ${CORE_INCLUDE_DIRS} PARENT_SCOPE)
|
||||
foreach (dir ${CORE_INCLUDE_DIRS})
|
||||
set(INDEX_INCLUDE_DIRS ${INDEX_INCLUDE_DIRS} PARENT_SCOPE)
|
||||
foreach (dir ${INDEX_INCLUDE_DIRS})
|
||||
include_directories(${dir})
|
||||
endforeach ()
|
||||
|
||||
|
@ -96,9 +96,9 @@ set(prometheus_lib
|
|||
)
|
||||
|
||||
set(boost_lib
|
||||
boost_system_static
|
||||
boost_filesystem_static
|
||||
boost_serialization_static
|
||||
libboost_system.a
|
||||
libboost_filesystem.a
|
||||
libboost_serialization.a
|
||||
)
|
||||
|
||||
set(cuda_lib
|
||||
|
|
|
@ -75,11 +75,11 @@ else()
|
|||
endif()
|
||||
message(STATUS "Build type = ${BUILD_TYPE}")
|
||||
|
||||
set(CORE_SOURCE_DIR ${PROJECT_SOURCE_DIR})
|
||||
set(CORE_BINARY_DIR ${PROJECT_BINARY_DIR})
|
||||
set(INDEX_SOURCE_DIR ${PROJECT_SOURCE_DIR})
|
||||
set(INDEX_BINARY_DIR ${PROJECT_BINARY_DIR})
|
||||
message(STATUS "Core source dir: ${PROJECT_SOURCE_DIR}")
|
||||
message(STATUS "Core binary dir: ${PROJECT_BINARY_DIR}")
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CORE_SOURCE_DIR}/cmake")
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${INDEX_SOURCE_DIR}/cmake")
|
||||
|
||||
include(ExternalProject)
|
||||
include(DefineOptionsCore)
|
||||
|
@ -92,7 +92,7 @@ if (BUILD_COVERAGE STREQUAL "ON")
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
|
||||
endif()
|
||||
|
||||
set(CORE_INCLUDE_DIRS ${CORE_INCLUDE_DIRS} PARENT_SCOPE)
|
||||
set(INDEX_INCLUDE_DIRS ${INDEX_INCLUDE_DIRS} PARENT_SCOPE)
|
||||
|
||||
if(BUILD_UNIT_TEST STREQUAL "ON")
|
||||
add_subdirectory(unittest)
|
||||
|
|
|
@ -75,7 +75,7 @@ function(ExternalProject_Use_Cache project_name package_file install_path)
|
|||
"Extracting ${package_file} to ${install_path}"
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E tar xzvf ${package_file} ${install_path}
|
||||
WORKING_DIRECTORY ${CORE_BINARY_DIR}
|
||||
WORKING_DIRECTORY ${INDEX_BINARY_DIR}
|
||||
)
|
||||
|
||||
ExternalProject_Add_StepTargets(${project_name} extract)
|
||||
|
|
|
@ -104,7 +104,7 @@ macro(config_summary)
|
|||
message(STATUS " Source directory: ${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
if(${CMAKE_EXPORT_COMPILE_COMMANDS})
|
||||
message(
|
||||
STATUS " Compile commands: ${CORE_BINARY_DIR}/compile_commands.json")
|
||||
STATUS " Compile commands: ${INDEX_BINARY_DIR}/compile_commands.json")
|
||||
endif()
|
||||
|
||||
foreach(category ${KNOWHERE_OPTION_CATEGORIES})
|
||||
|
|
|
@ -115,7 +115,7 @@ endif (UNIX)
|
|||
|
||||
# ----------------------------------------------------------------------
|
||||
# thirdparty directory
|
||||
set(THIRDPARTY_DIR "${CORE_SOURCE_DIR}/thirdparty")
|
||||
set(THIRDPARTY_DIR "${INDEX_SOURCE_DIR}/thirdparty")
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# JFrog
|
||||
|
@ -238,6 +238,7 @@ if(CUSTOMIZATION)
|
|||
if (NOT return_code EQUAL 0)
|
||||
MESSAGE(FATAL_ERROR "Can't access to ${FAISS_URL}")
|
||||
else()
|
||||
set(FAISS_SOURCE_URL ${FAISS_URL})
|
||||
# set(FAISS_MD5 "a589663865a8558205533c8ac414278c")
|
||||
# set(FAISS_MD5 "57da9c4f599cc8fa4260488b1c96e1cc") # commit-id 6dbdf75987c34a2c853bd172ea0d384feea8358c branch-0.2.0
|
||||
# set(FAISS_MD5 "21deb1c708490ca40ecb899122c01403") # commit-id 643e48f479637fd947e7b93fa4ca72b38ecc9a39 branch-0.2.0
|
||||
|
@ -283,7 +284,7 @@ set(OPENBLAS_MD5 "8a110a25b819a4b94e8a9580702b6495")
|
|||
|
||||
# ----------------------------------------------------------------------
|
||||
# ARROW
|
||||
set(ARROW_PREFIX "${CORE_BINARY_DIR}/arrow_ep-prefix/src/arrow_ep/cpp")
|
||||
set(ARROW_PREFIX "${INDEX_BINARY_DIR}/arrow_ep-prefix/src/arrow_ep/cpp")
|
||||
|
||||
macro(build_arrow)
|
||||
message(STATUS "Building Apache ARROW-${ARROW_VERSION} from source")
|
||||
|
@ -337,13 +338,13 @@ macro(build_arrow)
|
|||
"${ARROW_STATIC_LIB}"
|
||||
)
|
||||
|
||||
ExternalProject_Create_Cache(arrow_ep ${ARROW_CACHE_PACKAGE_PATH} "${CORE_BINARY_DIR}/arrow_ep-prefix" ${JFROG_USER_NAME} ${JFROG_PASSWORD} ${ARROW_CACHE_URL})
|
||||
ExternalProject_Create_Cache(arrow_ep ${ARROW_CACHE_PACKAGE_PATH} "${INDEX_BINARY_DIR}/arrow_ep-prefix" ${JFROG_USER_NAME} ${JFROG_PASSWORD} ${ARROW_CACHE_URL})
|
||||
else()
|
||||
file(DOWNLOAD ${ARROW_CACHE_URL} ${ARROW_CACHE_PACKAGE_PATH} STATUS status)
|
||||
list(GET status 0 status_code)
|
||||
message(STATUS "DOWNLOADING FROM ${ARROW_CACHE_URL} TO ${ARROW_CACHE_PACKAGE_PATH}. STATUS = ${status_code}")
|
||||
if (status_code EQUAL 0)
|
||||
ExternalProject_Use_Cache(arrow_ep ${ARROW_CACHE_PACKAGE_PATH} ${CORE_BINARY_DIR})
|
||||
ExternalProject_Use_Cache(arrow_ep ${ARROW_CACHE_PACKAGE_PATH} ${INDEX_BINARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
|
@ -379,7 +380,7 @@ macro(build_arrow)
|
|||
INTERFACE_INCLUDE_DIRECTORIES "${ARROW_INCLUDE_DIR}")
|
||||
add_dependencies(arrow arrow_ep)
|
||||
|
||||
set(JEMALLOC_PREFIX "${CORE_BINARY_DIR}/arrow_ep-prefix/src/arrow_ep-build/jemalloc_ep-prefix/src/jemalloc_ep")
|
||||
set(JEMALLOC_PREFIX "${INDEX_BINARY_DIR}/arrow_ep-prefix/src/arrow_ep-build/jemalloc_ep-prefix/src/jemalloc_ep")
|
||||
|
||||
add_custom_command(TARGET arrow_ep POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${ARROW_PREFIX}/lib/
|
||||
|
@ -401,7 +402,7 @@ endif()
|
|||
|
||||
macro(build_openblas)
|
||||
message(STATUS "Building OpenBLAS-${OPENBLAS_VERSION} from source")
|
||||
set(OPENBLAS_PREFIX "${CORE_BINARY_DIR}/openblas_ep-prefix/src/openblas_ep")
|
||||
set(OPENBLAS_PREFIX "${INDEX_BINARY_DIR}/openblas_ep-prefix/src/openblas_ep")
|
||||
set(OPENBLAS_INCLUDE_DIR "${OPENBLAS_PREFIX}/include")
|
||||
set(OPENBLAS_STATIC_LIB
|
||||
"${OPENBLAS_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}openblas${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
|
@ -434,13 +435,13 @@ macro(build_openblas)
|
|||
BUILD_BYPRODUCTS
|
||||
${OPENBLAS_STATIC_LIB})
|
||||
|
||||
ExternalProject_Create_Cache(openblas_ep ${OPENBLAS_CACHE_PACKAGE_PATH} "${CORE_BINARY_DIR}/openblas_ep-prefix" ${JFROG_USER_NAME} ${JFROG_PASSWORD} ${OPENBLAS_CACHE_URL})
|
||||
ExternalProject_Create_Cache(openblas_ep ${OPENBLAS_CACHE_PACKAGE_PATH} "${INDEX_BINARY_DIR}/openblas_ep-prefix" ${JFROG_USER_NAME} ${JFROG_PASSWORD} ${OPENBLAS_CACHE_URL})
|
||||
else()
|
||||
file(DOWNLOAD ${OPENBLAS_CACHE_URL} ${OPENBLAS_CACHE_PACKAGE_PATH} STATUS status)
|
||||
list(GET status 0 status_code)
|
||||
message(STATUS "DOWNLOADING FROM ${OPENBLAS_CACHE_URL} TO ${OPENBLAS_CACHE_PACKAGE_PATH}. STATUS = ${status_code}")
|
||||
if (status_code EQUAL 0)
|
||||
ExternalProject_Use_Cache(openblas_ep ${OPENBLAS_CACHE_PACKAGE_PATH} ${CORE_BINARY_DIR})
|
||||
ExternalProject_Use_Cache(openblas_ep ${OPENBLAS_CACHE_PACKAGE_PATH} ${INDEX_BINARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
|
@ -478,7 +479,7 @@ endmacro()
|
|||
|
||||
macro(build_lapack)
|
||||
message(STATUS "Building LAPACK-${LAPACK_VERSION} from source")
|
||||
set(LAPACK_PREFIX "${CORE_BINARY_DIR}/lapack_ep-prefix/src/lapack_ep")
|
||||
set(LAPACK_PREFIX "${INDEX_BINARY_DIR}/lapack_ep-prefix/src/lapack_ep")
|
||||
set(LAPACK_INCLUDE_DIR "${LAPACK_PREFIX}/include")
|
||||
set(LAPACK_STATIC_LIB
|
||||
"${LAPACK_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}lapack${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
|
@ -510,13 +511,13 @@ macro(build_lapack)
|
|||
BUILD_BYPRODUCTS
|
||||
${LAPACK_STATIC_LIB})
|
||||
|
||||
ExternalProject_Create_Cache(lapack_ep ${LAPACK_CACHE_PACKAGE_PATH} "${CORE_BINARY_DIR}/lapack_ep-prefix" ${JFROG_USER_NAME} ${JFROG_PASSWORD} ${LAPACK_CACHE_URL})
|
||||
ExternalProject_Create_Cache(lapack_ep ${LAPACK_CACHE_PACKAGE_PATH} "${INDEX_BINARY_DIR}/lapack_ep-prefix" ${JFROG_USER_NAME} ${JFROG_PASSWORD} ${LAPACK_CACHE_URL})
|
||||
else()
|
||||
file(DOWNLOAD ${LAPACK_CACHE_URL} ${LAPACK_CACHE_PACKAGE_PATH} STATUS status)
|
||||
list(GET status 0 status_code)
|
||||
message(STATUS "DOWNLOADING FROM ${LAPACK_CACHE_URL} TO ${LAPACK_CACHE_PACKAGE_PATH}. STATUS = ${status_code}")
|
||||
if (status_code EQUAL 0)
|
||||
ExternalProject_Use_Cache(lapack_ep ${LAPACK_CACHE_PACKAGE_PATH} ${CORE_BINARY_DIR})
|
||||
ExternalProject_Use_Cache(lapack_ep ${LAPACK_CACHE_PACKAGE_PATH} ${INDEX_BINARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
|
@ -559,7 +560,7 @@ macro(build_gtest)
|
|||
-Wno-ignored-attributes)
|
||||
endif()
|
||||
|
||||
set(GTEST_PREFIX "${CORE_BINARY_DIR}/googletest_ep-prefix/src/googletest_ep")
|
||||
set(GTEST_PREFIX "${INDEX_BINARY_DIR}/googletest_ep-prefix/src/googletest_ep")
|
||||
set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include")
|
||||
set(GTEST_STATIC_LIB
|
||||
"${GTEST_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
|
@ -601,13 +602,13 @@ macro(build_gtest)
|
|||
${GTEST_CMAKE_ARGS}
|
||||
${EP_LOG_OPTIONS})
|
||||
|
||||
ExternalProject_Create_Cache(googletest_ep ${GTEST_CACHE_PACKAGE_PATH} "${CORE_BINARY_DIR}/googletest_ep-prefix" ${JFROG_USER_NAME} ${JFROG_PASSWORD} ${GTEST_CACHE_URL})
|
||||
ExternalProject_Create_Cache(googletest_ep ${GTEST_CACHE_PACKAGE_PATH} "${INDEX_BINARY_DIR}/googletest_ep-prefix" ${JFROG_USER_NAME} ${JFROG_PASSWORD} ${GTEST_CACHE_URL})
|
||||
else()
|
||||
file(DOWNLOAD ${GTEST_CACHE_URL} ${GTEST_CACHE_PACKAGE_PATH} STATUS status)
|
||||
list(GET status 0 status_code)
|
||||
message(STATUS "DOWNLOADING FROM ${GTEST_CACHE_URL} TO ${GTEST_CACHE_PACKAGE_PATH}. STATUS = ${status_code}")
|
||||
if (status_code EQUAL 0)
|
||||
ExternalProject_Use_Cache(googletest_ep ${GTEST_CACHE_PACKAGE_PATH} ${CORE_BINARY_DIR})
|
||||
ExternalProject_Use_Cache(googletest_ep ${GTEST_CACHE_PACKAGE_PATH} ${INDEX_BINARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
|
@ -667,7 +668,7 @@ endif()
|
|||
|
||||
macro(build_faiss)
|
||||
message(STATUS "Building FAISS-${FAISS_VERSION} from source")
|
||||
set(FAISS_PREFIX "${CORE_BINARY_DIR}/faiss_ep-prefix/src/faiss_ep")
|
||||
set(FAISS_PREFIX "${INDEX_BINARY_DIR}/faiss_ep-prefix/src/faiss_ep")
|
||||
set(FAISS_INCLUDE_DIR "${FAISS_PREFIX}/include")
|
||||
set(FAISS_STATIC_LIB
|
||||
"${FAISS_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}faiss${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
|
@ -717,13 +718,13 @@ macro(build_faiss)
|
|||
|
||||
ExternalProject_Add_StepDependencies(faiss_ep build openblas_ep lapack_ep)
|
||||
|
||||
ExternalProject_Create_Cache(faiss_ep ${FAISS_CACHE_PACKAGE_PATH} "${CORE_BINARY_DIR}/faiss_ep-prefix" ${JFROG_USER_NAME} ${JFROG_PASSWORD} ${FAISS_CACHE_URL})
|
||||
ExternalProject_Create_Cache(faiss_ep ${FAISS_CACHE_PACKAGE_PATH} "${INDEX_BINARY_DIR}/faiss_ep-prefix" ${JFROG_USER_NAME} ${JFROG_PASSWORD} ${FAISS_CACHE_URL})
|
||||
else()
|
||||
file(DOWNLOAD ${FAISS_CACHE_URL} ${FAISS_CACHE_PACKAGE_PATH} STATUS status)
|
||||
list(GET status 0 status_code)
|
||||
message(STATUS "DOWNLOADING FROM ${FAISS_CACHE_URL} TO ${FAISS_CACHE_PACKAGE_PATH}. STATUS = ${status_code}")
|
||||
if (status_code EQUAL 0)
|
||||
ExternalProject_Use_Cache(faiss_ep ${FAISS_CACHE_PACKAGE_PATH} ${CORE_BINARY_DIR})
|
||||
ExternalProject_Use_Cache(faiss_ep ${FAISS_CACHE_PACKAGE_PATH} ${INDEX_BINARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
include_directories(${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
|
||||
link_directories(${CUDA_TOOLKIT_ROOT_DIR}/lib64)
|
||||
|
||||
include_directories(${CORE_SOURCE_DIR}/knowhere)
|
||||
include_directories(${CORE_SOURCE_DIR}/thirdparty)
|
||||
include_directories(${CORE_SOURCE_DIR}/thirdparty/SPTAG/AnnService)
|
||||
include_directories(${INDEX_SOURCE_DIR}/knowhere)
|
||||
include_directories(${INDEX_SOURCE_DIR}/thirdparty)
|
||||
include_directories(${INDEX_SOURCE_DIR}/thirdparty/SPTAG/AnnService)
|
||||
|
||||
set(SPTAG_SOURCE_DIR ${CORE_SOURCE_DIR}/thirdparty/SPTAG)
|
||||
set(SPTAG_SOURCE_DIR ${INDEX_SOURCE_DIR}/thirdparty/SPTAG)
|
||||
file(GLOB HDR_FILES
|
||||
${SPTAG_SOURCE_DIR}/AnnService/inc/Core/*.h
|
||||
${SPTAG_SOURCE_DIR}/AnnService/inc/Core/Common/*.h
|
||||
|
@ -102,20 +102,20 @@ INSTALL(FILES ${OPENBLAS_REAL_STATIC_LIB}
|
|||
DESTINATION lib
|
||||
)
|
||||
|
||||
set(CORE_INCLUDE_DIRS
|
||||
${CORE_SOURCE_DIR}/knowhere
|
||||
${CORE_SOURCE_DIR}/thirdparty
|
||||
${CORE_SOURCE_DIR}/thirdparty/SPTAG/AnnService
|
||||
set(INDEX_INCLUDE_DIRS
|
||||
${INDEX_SOURCE_DIR}/knowhere
|
||||
${INDEX_SOURCE_DIR}/thirdparty
|
||||
${INDEX_SOURCE_DIR}/thirdparty/SPTAG/AnnService
|
||||
${ARROW_INCLUDE_DIR}
|
||||
${FAISS_INCLUDE_DIR}
|
||||
${OPENBLAS_INCLUDE_DIR}
|
||||
${LAPACK_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
set(CORE_INCLUDE_DIRS ${CORE_INCLUDE_DIRS} PARENT_SCOPE)
|
||||
set(INDEX_INCLUDE_DIRS ${INDEX_INCLUDE_DIRS} PARENT_SCOPE)
|
||||
|
||||
#INSTALL(DIRECTORY
|
||||
# ${CORE_SOURCE_DIR}/include/knowhere
|
||||
# ${INDEX_SOURCE_DIR}/include/knowhere
|
||||
# ${ARROW_INCLUDE_DIR}/arrow
|
||||
# ${FAISS_PREFIX}/include/faiss
|
||||
# ${OPENBLAS_INCLUDE_DIR}/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
include_directories(${CORE_SOURCE_DIR}/thirdparty)
|
||||
include_directories(${CORE_SOURCE_DIR}/thirdparty/SPTAG/AnnService)
|
||||
include_directories(${CORE_SOURCE_DIR}/knowhere)
|
||||
include_directories(${CORE_SOURCE_DIR})
|
||||
include_directories(${INDEX_SOURCE_DIR}/thirdparty)
|
||||
include_directories(${INDEX_SOURCE_DIR}/thirdparty/SPTAG/AnnService)
|
||||
include_directories(${INDEX_SOURCE_DIR}/knowhere)
|
||||
include_directories(${INDEX_SOURCE_DIR})
|
||||
include_directories(/usr/local/cuda/include)
|
||||
link_directories(/usr/local/cuda/lib64)
|
||||
|
||||
|
@ -21,28 +21,28 @@ set(basic_libs
|
|||
|
||||
set(util_srcs
|
||||
${MILVUS_ENGINE_SRC}/utils/easylogging++.cc
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/helpers/FaissGpuResourceMgr.cpp
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/helpers/FaissIO.cpp
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/helpers/IndexParameter.cpp
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/adapter/Structure.cpp
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/adapter/ArrowAdapter.cpp
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/common/Exception.cpp
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/common/Timer.cpp
|
||||
${CORE_SOURCE_DIR}/unittest/utils.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/helpers/FaissGpuResourceMgr.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/helpers/FaissIO.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/helpers/IndexParameter.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/adapter/Structure.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/adapter/ArrowAdapter.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/common/Exception.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/common/Timer.cpp
|
||||
${INDEX_SOURCE_DIR}/unittest/utils.cpp
|
||||
)
|
||||
|
||||
#<IVF-TEST>
|
||||
set(ivf_srcs
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/helpers/Cloner.cpp
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexIVF.cpp
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexGPUIVF.cpp
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexIVFSQ.cpp
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexGPUIVFSQ.cpp
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexIVFPQ.cpp
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexGPUIVFPQ.cpp
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexIVFSQHybrid.cpp
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexIDMAP.cpp
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/FaissBaseIndex.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/helpers/Cloner.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexIVF.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexGPUIVF.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexIVFSQ.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexGPUIVFSQ.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexIVFPQ.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexGPUIVFPQ.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexIVFSQHybrid.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexIDMAP.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/FaissBaseIndex.cpp
|
||||
)
|
||||
if(NOT TARGET test_ivf)
|
||||
add_executable(test_ivf test_ivf.cpp ${ivf_srcs} ${util_srcs})
|
||||
|
@ -52,7 +52,7 @@ target_link_libraries(test_ivf ${depend_libs} ${unittest_libs} ${basic_libs})
|
|||
|
||||
#<IDMAP-TEST>
|
||||
set(idmap_srcs
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexIDMAP.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexIDMAP.cpp
|
||||
)
|
||||
if(NOT TARGET test_idmap)
|
||||
add_executable(test_idmap test_idmap.cpp ${idmap_srcs} ${ivf_srcs} ${util_srcs})
|
||||
|
@ -61,10 +61,10 @@ target_link_libraries(test_idmap ${depend_libs} ${unittest_libs} ${basic_libs})
|
|||
|
||||
#<KDT-TEST>
|
||||
set(kdt_srcs
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/adapter/SptagAdapter.cpp
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/index/preprocessor/Normalize.cpp
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/helpers/KDTParameterMgr.cpp
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexKDT.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/adapter/SptagAdapter.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/index/preprocessor/Normalize.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/helpers/KDTParameterMgr.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexKDT.cpp
|
||||
)
|
||||
if(NOT TARGET test_kdt)
|
||||
add_executable(test_kdt test_kdt.cpp ${kdt_srcs} ${util_srcs})
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
include_directories(${CORE_SOURCE_DIR}/thirdparty)
|
||||
include_directories(${CORE_SOURCE_DIR}/include)
|
||||
include_directories(${INDEX_SOURCE_DIR}/thirdparty)
|
||||
include_directories(${INDEX_SOURCE_DIR}/include)
|
||||
include_directories(/usr/local/cuda/include)
|
||||
link_directories(/usr/local/cuda/lib64)
|
||||
|
||||
|
|
|
@ -13,11 +13,11 @@ else ()
|
|||
endif ()
|
||||
message(${OpenMP_CXX_FLAGS})
|
||||
|
||||
include_directories(${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/nsg)
|
||||
aux_source_directory(${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/nsg nsg_src)
|
||||
include_directories(${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/nsg)
|
||||
aux_source_directory(${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/nsg nsg_src)
|
||||
|
||||
set(interface_src
|
||||
${CORE_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexNSG.cpp
|
||||
${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/IndexNSG.cpp
|
||||
)
|
||||
|
||||
if(NOT TARGET test_nsg)
|
||||
|
|
|
@ -50,7 +50,7 @@ print_banner() {
|
|||
std::cout << " / /|_/ // // /_| |/ / /_/ /\\ \\ " << std::endl;
|
||||
std::cout << " /_/ /_/___/____/___/\\____/___/ " << std::endl;
|
||||
std::cout << std::endl;
|
||||
std::cout << "Welcome to use Milvus by Zilliz!" << std::endl;
|
||||
std::cout << "Welcome to Milvus!" << std::endl;
|
||||
std::cout << "Milvus " << BUILD_TYPE << " version: v" << MILVUS_VERSION << ", built at " << BUILD_TIME << std::endl;
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
|
|
@ -40,8 +40,10 @@ constexpr int64_t BATCH_ROW_COUNT = 100000;
|
|||
constexpr int64_t NQ = 5;
|
||||
constexpr int64_t TOP_K = 10;
|
||||
constexpr int64_t SEARCH_TARGET = 5000; // change this value, result is different
|
||||
constexpr int64_t ADD_VECTOR_LOOP = 1;
|
||||
constexpr int64_t ADD_VECTOR_LOOP = 5;
|
||||
constexpr int64_t SECONDS_EACH_HOUR = 3600;
|
||||
constexpr milvus::IndexType INDEX_TYPE = milvus::IndexType::gpu_ivfsq8;
|
||||
constexpr int32_t N_LIST = 15000;
|
||||
|
||||
#define BLOCK_SPLITER std::cout << "===========================================" << std::endl;
|
||||
|
||||
|
@ -311,8 +313,8 @@ ClientTest::Test(const std::string& address, const std::string& port) {
|
|||
std::cout << "Wait until create all index done" << std::endl;
|
||||
milvus::IndexParam index;
|
||||
index.table_name = TABLE_NAME;
|
||||
index.index_type = milvus::IndexType::gpu_ivfsq8;
|
||||
index.nlist = 16384;
|
||||
index.index_type = INDEX_TYPE;
|
||||
index.nlist = N_LIST;
|
||||
milvus::Status stat = conn->CreateIndex(index);
|
||||
std::cout << "CreateIndex function call status: " << stat.message() << std::endl;
|
||||
|
||||
|
@ -344,8 +346,8 @@ ClientTest::Test(const std::string& address, const std::string& port) {
|
|||
|
||||
{ // delete by range
|
||||
milvus::Range rg;
|
||||
rg.start_value = CurrentTmDate(-2);
|
||||
rg.end_value = CurrentTmDate(-3);
|
||||
rg.start_value = CurrentTmDate(-3);
|
||||
rg.end_value = CurrentTmDate(-2);
|
||||
|
||||
milvus::Status stat = conn->DeleteByRange(rg, TABLE_NAME);
|
||||
std::cout << "DeleteByRange function call status: " << stat.message() << std::endl;
|
||||
|
|
|
@ -88,7 +88,7 @@ Status::MoveFrom(Status& s) {
|
|||
std::string
|
||||
Status::message() const {
|
||||
if (state_ == nullptr) {
|
||||
return "";
|
||||
return "OK";
|
||||
}
|
||||
|
||||
std::string msg;
|
||||
|
|
|
@ -62,7 +62,7 @@ static const char* CONFIG_CACHE = "cache_config";
|
|||
static const char* CONFIG_CACHE_CPU_CACHE_CAPACITY = "cpu_cache_capacity";
|
||||
static const char* CONFIG_CACHE_CPU_CACHE_CAPACITY_DEFAULT = "16";
|
||||
static const char* CONFIG_CACHE_GPU_CACHE_CAPACITY = "gpu_cache_capacity";
|
||||
static const char* CONFIG_CACHE_GPU_CACHE_CAPACITY_DEFAULT = "0";
|
||||
static const char* CONFIG_CACHE_GPU_CACHE_CAPACITY_DEFAULT = "4";
|
||||
static const char* CONFIG_CACHE_CPU_CACHE_THRESHOLD = "cpu_mem_threshold";
|
||||
static const char* CONFIG_CACHE_CPU_CACHE_THRESHOLD_DEFAULT = "0.85";
|
||||
static const char* CONFIG_CACHE_GPU_CACHE_THRESHOLD = "gpu_mem_threshold";
|
||||
|
|
|
@ -88,7 +88,7 @@ Status::MoveFrom(Status& s) {
|
|||
std::string
|
||||
Status::message() const {
|
||||
if (state_ == nullptr) {
|
||||
return "";
|
||||
return "OK";
|
||||
}
|
||||
|
||||
std::string msg;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
sudo apt-get install -y gfortran libmysqlclient-dev mysql-client libcurl4-openssl-dev libboost-system-dev libboost-filesystem-dev libboost-serialization-dev
|
||||
|
||||
sudo ln -s /usr/lib/x86_64-linux-gnu/libmysqlclient.so /usr/lib/x86_64-linux-gnu/libmysqlclient_r.so
|
|
@ -18,7 +18,7 @@
|
|||
#-------------------------------------------------------------------------------
|
||||
include_directories("${CUDA_TOOLKIT_ROOT_DIR}/include")
|
||||
|
||||
foreach(dir ${CORE_INCLUDE_DIRS})
|
||||
foreach(dir ${INDEX_INCLUDE_DIRS})
|
||||
include_directories(${dir})
|
||||
endforeach()
|
||||
|
||||
|
@ -92,8 +92,8 @@ set(common_files
|
|||
|
||||
set(unittest_libs
|
||||
sqlite
|
||||
boost_system_static
|
||||
boost_filesystem_static
|
||||
libboost_system.a
|
||||
libboost_filesystem.a
|
||||
lz4
|
||||
mysqlpp
|
||||
yaml-cpp
|
||||
|
|
|
@ -405,8 +405,8 @@ TEST_F(RpcHandlerTest, DELETE_BY_RANGE_TEST) {
|
|||
handler->DeleteByRange(&context, &request, &status);
|
||||
|
||||
request.set_table_name(TABLE_NAME);
|
||||
request.mutable_range()->set_start_value(CurrentTmDate(-2));
|
||||
request.mutable_range()->set_end_value(CurrentTmDate(-3));
|
||||
request.mutable_range()->set_start_value(CurrentTmDate(-3));
|
||||
request.mutable_range()->set_end_value(CurrentTmDate(-2));
|
||||
|
||||
::grpc::Status grpc_status = handler->DeleteByRange(&context, &request, &status);
|
||||
int error_code = status.error_code();
|
||||
|
|
Loading…
Reference in New Issue