Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
fd041d5
changes for avx512
Aug 8, 2024
263d49c
minor edits to avx512 check
Aug 20, 2024
97905aa
some more changes
Aug 23, 2024
8f8655e
fixes
akashsha1 Aug 28, 2024
a498916
more fixes
akashsha1 Aug 28, 2024
72173df
Modify faiss submodule to point to local repo.
mulugetam Aug 28, 2024
3f8eaa1
Fix avx-512 flag check.
mulugetam Aug 28, 2024
02f08f7
Fix formatting issue.
mulugetam Aug 28, 2024
19798e4
Merge branch 'main' into intel/avx512faiss
akashsha1 Sep 7, 2024
3a9a29b
few more fixes
akashsha1 Sep 7, 2024
96325af
remove extra class files
akashsha1 Sep 7, 2024
bcf2f88
address CR feedback
akashsha1 Sep 10, 2024
086a4d0
fix spotless check
akashsha1 Sep 10, 2024
7dd0a9f
Update CHANGELOG.md
akashsha1 Sep 10, 2024
6813cb7
update build script per CR feedback
akashsha1 Sep 10, 2024
097c7c1
update CI script
akashsha1 Sep 10, 2024
9517637
update dev guide and build script
akashsha1 Sep 13, 2024
273cac0
DCO check Signed-off by Akash Shankaran <[email protected]>
akashsha1 Sep 13, 2024
8bcb7eb
Update scripts/build.sh
akashsha1 Sep 16, 2024
14c6486
changes for avx512
Aug 8, 2024
7f36e50
minor edits to avx512 check
Aug 20, 2024
d5c58ee
some more changes
Aug 23, 2024
0658dac
fixes
akashsha1 Aug 28, 2024
4fac524
more fixes
akashsha1 Aug 28, 2024
e36a545
Modify faiss submodule to point to local repo.
mulugetam Aug 28, 2024
3d402be
Fix avx-512 flag check.
mulugetam Aug 28, 2024
8de2aa3
Fix formatting issue.
mulugetam Aug 28, 2024
17007bd
Refactor Around Mapper and Mapping (#1939)
jmazanec15 Aug 10, 2024
e007ca4
Integrate Lucene Vector field with native engines to use KNNVectorFor…
navneet1v Aug 12, 2024
cc51ec9
Disallow invalid characters for physical file name to be included wit…
0ctopus13prime Aug 12, 2024
074f44d
Quantization Framework Implementation with 1bit and MultiBit Binary Q…
Vikasht34 Aug 13, 2024
7dad9b1
Integrate KNNVectorValues with vector ANN Search flow (#1952)
navneet1v Aug 14, 2024
09489f0
BackPort Java Doc Fix with Code Improvements (#1959)
Vikasht34 Aug 14, 2024
d506241
Quantization Framework Code Structure Improvement (#1967)
Vikasht34 Aug 15, 2024
08fe9f3
Adds rescore parameter to KNNQuery (#1969)
jmazanec15 Aug 15, 2024
6312f68
Encapsulate dimension, vector data type validation/processing inside …
jmazanec15 Aug 15, 2024
3979043
Fix bwc version for rescore (#1975)
jmazanec15 Aug 16, 2024
029e119
Fixing the dimension for the vector when using Lucene field in ModelF…
navneet1v Aug 19, 2024
9d3dc67
Disables rewrite code path to debug latency issues (#1987)
shatejas Aug 19, 2024
59d187c
Add quantization state cache (#1960)
ryanbogan Aug 20, 2024
48807b7
Integrates FAISS iterative builds with NativeEngines990KnnVectorsForm…
shatejas Aug 20, 2024
0b10d99
Add support for qframework from interface (#1994)
jmazanec15 Aug 21, 2024
74a60b2
Fix string for qframe parser key (#1999)
jmazanec15 Aug 22, 2024
9a8b1f5
k-NN query rescore support for native engines (#1984)
jmazanec15 Aug 22, 2024
e9fdfae
Add HNSW changes to support Faiss byte vector (#1823)
naveentatikonda Aug 23, 2024
76c031e
Integration of Quantization Framework for Binary Quantization with In…
Vikasht34 Aug 26, 2024
4b8ed7e
Parallelize make to reduce build time (#2006)
naveentatikonda Aug 28, 2024
51c6d86
Align dimensions to the nearest multiple of 8 in QuantizationState (#…
Vikasht34 Aug 29, 2024
8de553e
Changes NativeEngineKNNQuery to execute search and rescore in (#2014)
shatejas Aug 30, 2024
d42f3fe
Add IVF changes to support Faiss byte vector (#2002)
naveentatikonda Aug 30, 2024
c7fba2b
Makes NativeEngines990KnnVectorFormat as default for index version (#…
shatejas Sep 3, 2024
e04706e
Adds graph build time metrics in NativeEngines990KnnVectorsWriter (#2…
shatejas Sep 3, 2024
28133e3
Fixing the format name for NativeEngines990KnnVectorsFormat (#2025)
navneet1v Sep 4, 2024
711e734
Introduce compression and mode mapping parms (#2019)
jmazanec15 Sep 4, 2024
c3db30b
Fix memory overflow caused by cache behavior (#2015)
kotwanikunal Sep 4, 2024
f267a68
Add release notes for 2.17 (#2037)
naveentatikonda Sep 4, 2024
652490d
Add quantization state reader and writer (#1997)
ryanbogan Sep 5, 2024
f024c50
Introduce mode and compression param resolution (#2034)
jmazanec15 Sep 5, 2024
d8a1691
Fix tests related to quantization state (#2045)
ryanbogan Sep 5, 2024
d7ec5ed
Add spaceType as a top level parameter while creating vector field. (…
navneet1v Sep 5, 2024
690b733
Fix the force merge with Quantization failures when a segment has del…
navneet1v Sep 5, 2024
5683af9
Add model version to model metadata and change model metadata reads t…
ryanbogan Sep 5, 2024
c68bf6a
Add tests for top level spaceType parameter with different combinatio…
navneet1v Sep 6, 2024
cf4c6a6
Fix expected string for get model response tests (#2062)
ryanbogan Sep 6, 2024
30635ce
Throws and exception for radial search when mapping is for on-disk mo…
shatejas Sep 7, 2024
c659b4a
few more fixes
akashsha1 Sep 7, 2024
d4c7a7a
few more fixes
akashsha1 Sep 7, 2024
b3baf43
address CR feedback
akashsha1 Sep 10, 2024
6f24bb4
fix spotless check
akashsha1 Sep 10, 2024
0214423
Update CHANGELOG.md
akashsha1 Sep 10, 2024
94c7ec8
update build script per CR feedback
akashsha1 Sep 10, 2024
c98520d
update CI script
akashsha1 Sep 10, 2024
721e000
update dev guide and build script
akashsha1 Sep 13, 2024
c1b83d3
DCO check Signed-off by Akash Shankaran <[email protected]>
akashsha1 Sep 13, 2024
8a4ab86
Update scripts/build.sh
akashsha1 Sep 16, 2024
347e750
Merge branch 'intel/avx512faiss' of https://github.com/akashsha1/k-NN…
akashsha1 Sep 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 10 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,17 @@ jobs:
# switching the user, as OpenSearch cluster can only be started as root/Administrator on linux-deb/linux-rpm/windows-zip.
run: |
chown -R 1000:1000 `pwd`
if lscpu | grep -i avx2
if lscpu | grep -i avx512f | grep -i avx512cd | grep -i avx512vl | grep -i avx512dq | grep -i avx512bw
then
echo "avx2 available on system"
echo "avx512 available on system"
su `id -un 1000` -c "whoami && java -version && ./gradlew build -Dnproc.count=`nproc`"
elif lscpu | grep -i avx2
then
echo "avx2 available on system"
su `id -un 1000` -c "whoami && java -version && ./gradlew build -Dnproc.count=`nproc` -Davx512.enabled=false"
else
echo "avx2 not available on system"
su `id -un 1000` -c "whoami && java -version && ./gradlew build -Dsimd.enabled=false -Dnproc.count=`nproc`"
echo "avx512 and avx2 not available on system"
su `id -un 1000` -c "whoami && java -version && ./gradlew build -Davx2.enabled=false -Davx512.enabled=false -Dnproc.count=`nproc`"
fi


Expand Down Expand Up @@ -126,7 +130,7 @@ jobs:
./gradlew build -Dnproc.count=3
else
echo "avx2 not available on system"
./gradlew build -Dsimd.enabled=false -Dnproc.count=3
./gradlew build -Davx2.enabled=false -Davx512.enabled=false -Dnproc.count=3
fi

Build-k-NN-Windows:
Expand Down Expand Up @@ -187,4 +191,4 @@ jobs:
# TODO: Detect processor count and set the value of nproc.count
- name: Run build
run: |
./gradlew.bat build -D'simd.enabled=false' -D'nproc.count=4'
./gradlew.bat build -D'avx2.enabled=false' -D'avx512.enabled=false' -D'nproc.count=4'
2 changes: 1 addition & 1 deletion .github/workflows/test_security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ jobs:
# switching the user, as OpenSearch cluster can only be started as root/Administrator on linux-deb/linux-rpm/windows-zip.
run: |
chown -R 1000:1000 `pwd`
su `id -un 1000` -c "whoami && java -version && ./gradlew integTest -Dsecurity.enabled=true -Dsimd.enabled=true -Dnproc.count=`nproc`"
su `id -un 1000` -c "whoami && java -version && ./gradlew integTest -Dsecurity.enabled=true -Davx2.enabled=true -Davx512.enabled=true -Dnproc.count=`nproc`"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased 2.x](https://github.com/opensearch-project/k-NN/compare/2.17...2.x)
### Features
* Add AVX512 support to k-NN for FAISS library [#2069](https://github.com/opensearch-project/k-NN/pull/2069)
### Enhancements
### Bug Fixes
### Infrastructure
Expand Down
13 changes: 8 additions & 5 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,19 +283,22 @@ make -j 4

### Enable SIMD Optimization
SIMD(Single Instruction/Multiple Data) Optimization is enabled by default on Linux and Mac which boosts the performance
by enabling `AVX2` on `x86 architecture` and `NEON` on `ARM64 architecture` while building the Faiss library. But to enable SIMD, the underlying processor
should support this (AVX2 or NEON). It can be disabled by setting the parameter `simd.enabled` to `false`. As of now, it is not supported on Windows OS.
by enabling `AVX2` and `AVX512` on `x86 architecture` and `NEON` on `ARM64 architecture` where applicable while building the Faiss library. But to enable SIMD,
the underlying processor should support these capabilities (AVX512, AVX2 or NEON). It can be disabled by setting the parameter `avx2.enabled` to `false` and
`avx512.enabled` to `false`. If your processor supports `AVX512` or `AVX2`, they can be set by enabling the setting . By default, these values are enabled on
OpenSearch. Some exceptions: As of now, SIMD support is not supported on Windows OS, and AVX512 is not present on MAC systems due to hardware not supporting the
feature.

```
# While building OpenSearch k-NN
./gradlew build -Dsimd.enabled=true
./gradlew build -Davx2.enabled=true -Davx512.enabled=true

# While running OpenSearch k-NN
./gradlew run -Dsimd.enabled=true
./gradlew run -Davx2.enabled=true -Davx512.enabled=true

# While building the JNI libraries
cd jni
cmake . -DSIMD_ENABLED=true
cmake . -DAVX2_ENABLED=true -DAVX512_ENABLED=true
```

## Run OpenSearch k-NN
Expand Down
10 changes: 10 additions & 0 deletions bin/main/META-INF/services/org.apache.lucene.codecs.Codec
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
org.opensearch.knn.index.codec.KNN80Codec.KNN80Codec
org.opensearch.knn.index.codec.KNN84Codec.KNN84Codec
org.opensearch.knn.index.codec.KNN86Codec.KNN86Codec
org.opensearch.knn.index.codec.KNN87Codec.KNN87Codec
org.opensearch.knn.index.codec.KNN910Codec.KNN910Codec
org.opensearch.knn.index.codec.KNN920Codec.KNN920Codec
org.opensearch.knn.index.codec.KNN940Codec.KNN940Codec
org.opensearch.knn.index.codec.KNN950Codec.KNN950Codec
org.opensearch.knn.index.codec.KNN990Codec.KNN990Codec
org.opensearch.knn.index.codec.KNN990Codec.UnitTestCodec
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
#
# Modifications Copyright OpenSearch Contributors. See
# GitHub history for details.
#

org.opensearch.knn.index.codec.KNN990Codec.NativeEngines990KnnVectorsFormat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0

org.opensearch.knn.plugin.script.KNNAllowlistExtension
46 changes: 46 additions & 0 deletions bin/main/mappings/model-index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"properties": {
"model_id": {
"type": "keyword"
},
"engine": {
"type": "keyword"
},
"space_type": {
"type": "keyword"
},
"dimension": {
"type": "integer"
},
"state": {
"type": "keyword"
},
"timestamp": {
"type": "date"
},
"description": {
"type": "keyword"
},
"error": {
"type": "keyword"
},
"model_blob": {
"type": "binary"
},
"node_assignment": {
"type": "keyword"
},
"method_component_context": {
"type": "keyword"
},
"mode": {
"type": "keyword"
},
"compression_level": {
"type": "keyword"
},
"model_version": {
"type": "keyword"
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added bin/main/org/opensearch/knn/indices/Model.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading