Build FBGEMM from source

Get FREE domain for 1st year and build your brand new site

Free book on Graph Algorithms

In this article, we have explained how to build and install FBGEMM library from source.

Table of contents:

  1. Introduction to FBGEMM
  2. Build FBGEMM from source

Introduction to FBGEMM

FBGEMM stands for "Facebook GEneral Matrix Multiplication".

FBGEMM is a library developed by Facebook for low precision matrix multiplication and convolution with focus on high server performance. It is used in Caffe2 and PyTorch frameworks which are leading Machine Learning frameworks.

FBGEMM is an open-source library.

Build FBGEMM from source

  • Get source code of FBGEMM

Use the following commands:

git clone --recursive https://github.com/pytorch/FBGEMM.git
cd FBGEMM
git submodule sync
git submodule update --init --recursive

The above commands will download the dependencies of FBGEMM as well. If you do not wish to download the dependencies and build them separately, you can do so as well.

  • Build and Install FBGEMM
mkdir build && cd build
cmake ..
make -j 64
make test
sudo make install

Depending on the system you are using, the build process may take from 10 minutes up to 25 minutes.

Try FBGEMM by building it from source. It is an exceptional library for low precision.