Faiss.NET.Interop
1.0.0-preview.5
dotnet add package Faiss.NET.Interop --version 1.0.0-preview.5
NuGet\Install-Package Faiss.NET.Interop -Version 1.0.0-preview.5
<PackageReference Include="Faiss.NET.Interop" Version="1.0.0-preview.5" />
<PackageVersion Include="Faiss.NET.Interop" Version="1.0.0-preview.5" />
<PackageReference Include="Faiss.NET.Interop" />
paket add Faiss.NET.Interop --version 1.0.0-preview.5
#r "nuget: Faiss.NET.Interop, 1.0.0-preview.5"
#:package Faiss.NET.Interop@1.0.0-preview.5
#addin nuget:?package=Faiss.NET.Interop&version=1.0.0-preview.5&prerelease
#tool nuget:?package=Faiss.NET.Interop&version=1.0.0-preview.5&prerelease
Faiss.NET
High-performance C#/.NET bindings for Faiss.
Faiss.NET gives you near-native performance with clean, idiomatic C# wrappers while staying as close as possible to the original Faiss API.
- Faiss v1.14.1
- .NET 9.0
This library is under active development. Core indexes and functionality are usable, but the API may still evolve and not every feature is complete yet.
Features
- Thin, "bare-metal" bindings with minimal overhead
- Extensions on top bindings for excellent DX
- Cross-platform support (Windows, Linux, macOS all x64 & arm64)
- Strongly-typed wrappers + generic factory for all Faiss indexes
- GPU acceleration (CUDA & ROCm)
- It just works™
Table of Contents
Installation
Prerequisites
Windows
winget install --id Microsoft.VCRedist.2015+.x64 --silent
Linux
sudo apt-get install -y libopenblas0 libgomp1 libgfortran5
macOS
brew install libomp
NuGet Package
Pick either the CPU only or the CPU + GPU support NuGet, do not mix on the same platform, it would cause undefined behavior.
CPU only
dotnet add package Faiss.NET.Native
CPU+GPU
CUDA
dotnet add package Faiss.NET.Native.Gpu.Cuda # Linux only
dotnet add package Faiss.NET.Native.Windows
dotnet add package Faiss.NET.Native.MacOS
ROCm
dotnet add package Faiss.NET.Native.Gpu.Rocm # Linux x64 only
dotnet add package Faiss.NET.Native.Windows
dotnet add package Faiss.NET.Native.MacOS
Usage
Basic Flat index
using Faiss.NET;
int dimensions = 4;
using var index = new IndexFlatL2(dimensions);
float[] vector = [1.0f, 2.0f, 3.0f, 4.0f];
index.Add(vector);
using var result = index.Search(vector, k: 1);
float distance = result.Distances[0]; // 0.0f
long label = result.Labels[0]; // 0
Supported Platforms
| Platform | x64 | arm64 |
|---|---|---|
| Windows | ✅ | ✅ |
| Linux | ✅ | ✅ |
| macOS | ✅ | ✅ |
GPU Acceleration
| Backend | Platform | x64 | arm64 |
|---|---|---|---|
| CUDA | Linux | ✅ | ✅ |
| ROCm | Linux | ✅ | ❌ |
Supported CUDA GPUs
| Compute Capability | Architecture | Example GPUs |
|---|---|---|
| 75 | Turing | RTX 20-series, Tesla T4 |
| 80 | Ampere | A100 |
| 86 | Ampere | RTX 30-series, A40, A10, A16, A30 |
| 89 | Ada Lovelace | RTX 40-series, L40, L40S, L4 |
| 90 | Hopper | H100, H200 |
| 120 | Blackwell | RTX 50-series, B100, B200, GB200 |
Supported ROCm GPUs
| GFX Architecture | Architecture | Example GPUs |
|---|---|---|
| gfx90a | CDNA2 | AMD Instinct MI210, MI250, MI250X |
| gfx942 | CDNA3 | AMD Instinct MI300A, MI300X, MI325X |
| gfx950 | CDNA4 | AMD Instinct MI355X, MI350 series |
| gfx1030 / 1031 / 1032 | RDNA2 | Radeon RX 6600–6900 series |
| gfx1100 / 1101 / 1102 | RDNA3 | Radeon RX 7700–7900 series |
| gfx1200 / 1201 | RDNA4 | Radeon RX 9060 series and RX 9070 series |
License
See the LICENSE file for details.
Faiss.NET is not affiliated with Meta or the original Faiss project.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- No dependencies.
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Faiss.NET.Interop:
| Package | Downloads |
|---|---|
|
Faiss.NET.Native.Linux
Native Linux (x64 and arm64) binaries for Faiss.NET. |
|
|
Faiss.NET.Native.MacOS
Native MacOS (x64 and arm64) binaries for Faiss.NET. |
|
|
Faiss.NET.Native
Cross-platform native binaries meta-package for Faiss.NET. Includes Linux, Windows, and macOS runtimes. |
|
|
Faiss.NET.Native.Windows
Native Windows (x64 and arm64) binaries for Faiss.NET. |
|
|
Faiss.NET.Gpu
GPU extension for Faiss.NET. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-preview.5 | 121 | 5/18/2026 |
| 1.0.0-preview.4 | 200 | 4/30/2026 |
| 1.0.0-preview.3 | 86 | 3/31/2026 |
| 1.0.0-preview.2 | 77 | 3/30/2026 |