You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
20
20
- Add Support for Multi Values in innerHit for Nested k-NN Fields in Lucene and FAISS (#2283)[https://github.com/opensearch-project/k-NN/pull/2283]
21
21
- Add binary index support for Lucene engine. (#2292)[https://github.com/opensearch-project/k-NN/pull/2292]
22
22
- Add expand_nested_docs Parameter support to NMSLIB engine (#2331)[https://github.com/opensearch-project/k-NN/pull/2331]
23
+
- Add a new build mode, `FAISS_OPT_LEVEL=avx512_spr`, which enables the use of advanced AVX-512 instructions introduced with Intel(R) Sapphire Rapids (#2404)[https://github.com/opensearch-project/k-NN/pull/2404]
23
24
- Add cosine similarity support for faiss engine (#2376)[https://github.com/opensearch-project/k-NN/pull/2376]
24
25
### Enhancements
25
26
- Introduced a writing layer in native engines where relies on the writing interface to process IO. (#2241)[https://github.com/opensearch-project/k-NN/pull/2241]
Copy file name to clipboardExpand all lines: DEVELOPER_GUIDE.md
+27-10
Original file line number
Diff line number
Diff line change
@@ -297,21 +297,38 @@ make -j 4
297
297
### Enable SIMD Optimization
298
298
SIMD(Single Instruction/Multiple Data) Optimization is enabled by default on Linux and Mac which boosts the performance
299
299
by enabling `AVX2` and `AVX512` on `x86 architecture` and `NEON` on `ARM64 architecture` where applicable while building the Faiss library. But to enable SIMD,
300
-
the underlying processor should support these capabilities (AVX512, AVX2 or NEON). It can be disabled by setting the parameter `avx2.enabled` to `false` and
301
-
`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
302
-
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
303
-
feature.
300
+
the underlying processor should support these capabilities (AVX512, AVX2 or NEON). It can be disabled by setting the parameter `avx2.enabled`, `avx512.enabled`,
301
+
and `avx512_spr.enabled` to `false`. If your processor supports `AVX512` or `AVX2`, they can be set by enabling the setting. On Intel(R) Sapphire Rapids and
302
+
newer-generation systems, enabling `avx512_spr` offers support for`AVX512-FP16` and other features. By default, these values are enabled on OpenSearch.
303
+
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.
Copy file name to clipboardExpand all lines: jni/cmake/init-faiss.cmake
+15-1
Original file line number
Diff line number
Diff line change
@@ -108,9 +108,23 @@ if(NOT DEFINED AVX512_ENABLED)
108
108
set(AVX512_ENABLED true) # set default value as true if the argument is not set
109
109
endif()
110
110
111
-
if(${CMAKE_SYSTEM_NAME}STREQUAL Windows OR${CMAKE_SYSTEM_PROCESSOR}MATCHES"aarch64"OR${CMAKE_SYSTEM_PROCESSOR}MATCHES"arm64"OR ( NOT AVX2_ENABLED ANDNOT AVX512_ENABLED))
111
+
if(NOTDEFINED AVX512_SPR_ENABLED)
112
+
# Check if the system is Intel(R) Sapphire Rapids or a newer-generation processor
if(${CMAKE_SYSTEM_NAME}STREQUAL Windows OR${CMAKE_SYSTEM_PROCESSOR}MATCHES"aarch64"OR${CMAKE_SYSTEM_PROCESSOR}MATCHES"arm64"OR ( NOT AVX2_ENABLED ANDNOT AVX512_ENABLED ANDNOT AVX512_SPR_ENABLED))
112
122
set(FAISS_OPT_LEVEL generic) # Keep optimization level as generic on Windows OS as it is not supported due to MINGW64 compiler issue. Also, on aarch64 avx2 is not supported.
113
123
set(TARGET_LINK_FAISS_LIB faiss)
124
+
elseif(${CMAKE_SYSTEM_NAME}STREQUAL Linux AND AVX512_SPR_ENABLED)
125
+
set(FAISS_OPT_LEVEL avx512_spr)
126
+
set(TARGET_LINK_FAISS_LIB faiss_avx512_spr)
127
+
string(PREPEND LIB_EXT "_avx512_spr")
114
128
elseif(${CMAKE_SYSTEM_NAME}STREQUAL Linux AND AVX512_ENABLED)
115
129
set(FAISS_OPT_LEVEL avx512) # Keep optimization level as avx512 to improve performance on Linux. This is not present on mac systems, and presently not supported on Windows OS.
0 commit comments