Git Product home page Git Product logo

faiss_windows_build's Introduction

faiss build for my windows machine.

Not so much tested.

build.ps1 runs only for RTX30 series so for others, edit value of CMAKE_CUDA_ARCHITECTURES in build.ps1 then rebuild.

Environment on my machine

  • H/W: AMD Ryzen 3600, 32GB RAM, RTX 3060Ti
  • Visual Studio 2022 community
  • CMake 3.26.3
  • Python 3.7.3, 3.10.11
  • CUDA Toolkit 12.1
    • Environment variable CUDA_PATH must be set
  • Git 2.40.1

Build

First, clone or download this repository.

Powershell scripts

  • Before execute ps1 script files, ExecutionPolicy should be set to RemoteSigned and unblock ps1 files
# Check
ExecutionPolicy
# Set as RemoteSigned
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

# Unblock ps1 files
Unblock-File *.ps1

Submodule

  • Run if faiss submodule is not cloned yet
git submodule update --init --recursive
cd faiss
git checkout v1.7.4
cd ..

Compile

  • Not use MKL. Instead OpenBLAS and SWIG will be downloaded and be used during compilation
./build.ps1

Install

cd dist
python setup.py install

Run

cd samples/hello_faiss
python main.py

cd samples/gpu
python main.py

Clean build

./clean.ps1
# or
./clean.ps1 all # Remove OpenBLAS and SWIG

Uninstall

  • Delete %PYTHON_LIB_PATH%/site-packages/faiss-1.7.4-py3.xx.egg folder

faiss_windows_build's People

Contributors

edp1096 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.