Faiss.NET.Native.MacOS
1.0.0-preview.3
dotnet add package Faiss.NET.Native.MacOS --version 1.0.0-preview.3
NuGet\Install-Package Faiss.NET.Native.MacOS -Version 1.0.0-preview.3
<PackageReference Include="Faiss.NET.Native.MacOS" Version="1.0.0-preview.3" />
<PackageVersion Include="Faiss.NET.Native.MacOS" Version="1.0.0-preview.3" />
<PackageReference Include="Faiss.NET.Native.MacOS" />
paket add Faiss.NET.Native.MacOS --version 1.0.0-preview.3
#r "nuget: Faiss.NET.Native.MacOS, 1.0.0-preview.3"
#:package Faiss.NET.Native.MacOS@1.0.0-preview.3
#addin nuget:?package=Faiss.NET.Native.MacOS&version=1.0.0-preview.3&prerelease
#tool nuget:?package=Faiss.NET.Native.MacOS&version=1.0.0-preview.3&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
- Strongly-typed wrappers + generic factory for all Faiss indexes
- Currently implemented indexes:
IndexFlatIPIndexFlatL2IndexHNSW
- Full index serialization / deserialization
- GPU acceleration (CUDA & ROCm) + GPU sharding
- Cross-platform support (Windows, Linux, macOS — x64 & arm64)
Table of Contents
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 |
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
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 Example
using Faiss.NET;
int dimensions = 4;
using var index = new FaissIndex<FaissIndexFlatL2>(new FaissIndexFlatL2(dimensions));
float[] vector = [1.0f, 2.0f, 3.0f, 4.0f];
index.Add(vector);
using var result = index.Search(vector, k: 1);
float distance = searchResult.Distances[0]; // 0.0f
long label = searchResult.Labels[0]; // 0
Low-Level API Example
using Faiss.NET;
int dimensions = 2;
using var index = new FaissIndexFlatIP(dimensions);
float[] vectors = [2.0f, 3.0f];
index.Add(1, vectors);
float[] distances = new float[1];
long[] labels = new long[1];
index.Search(1, vectors, 1, distances, labels);
long foundLabel = labels[0]; // 0
float foundDistance = distances[0]; // 13
License
This project is licensed under the MIT License — see the LICENSE file for details.
Faiss.NET is not affiliated with Meta or the original Faiss project.
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Faiss.NET.Interop (>= 1.0.0-preview.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Faiss.NET.Native.MacOS:
| Package | Downloads |
|---|---|
|
Faiss.NET.Native
Cross-platform native binaries meta-package for Faiss.NET. Includes Linux, Windows, and macOS runtimes. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-preview.3 | 28 | 3/31/2026 |
| 1.0.0-preview.2 | 36 | 3/30/2026 |
| 1.0.0-preview.1 | 36 | 3/30/2026 |