Build and Installation

Build and Installation#

Obtain Source Code#

git clone https://github.com/flagos-ai/FlagCX.git
cd FlagCX
git submodule update --init --recursive

Installation#

Option A — Pythonic Installation (pip install):

pip install . -v --no-build-isolation

Option B — C++ library (make):

make <backend>=1 -j$(nproc)

where <backend> is one of:

  • USE_NVIDIA: NVIDIA GPU support

  • USE_ILUVATAR_COREX: Iluvatar Corex support

  • USE_CAMBRICON: Cambricon support

  • USE_METAX: MetaX support

  • USE_MUSA: Moore Threads support

  • USE_KUNLUNXIN: Kunlunxin support

  • USE_DU: Hygon support

  • USE_ASCEND: Huawei Ascend support

  • USE_AMD: AMD support

  • USE_TSM: TsingMicro support

  • USE_ENFLAME: Enflame support

  • USE_GLOO: GLOO support

  • USE_MPI: MPI support

Note that Option A also supports <backend>=1, allowing users to explicitly specify the backend. Otherwise, it will be selected automatically.

The default installation path is set to build/, you can manually set BUILDDIR environment variable to customize the build path. You may also specify DEVICE_HOME and/or CCL_HOME to indicate the installation paths of the device runtime and installation path of the communication libraries respectively.