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 supportUSE_ILUVATAR: Iluvatar GPU supportUSE_ILUVATAR_COREX: deprecated compatibility alias forUSE_ILUVATARUSE_CAMBRICON: Cambricon supportUSE_METAX: MetaX supportUSE_MUSA: Moore Threads supportUSE_KUNLUNXIN: Kunlunxin supportUSE_DU: Hygon supportUSE_ASCEND: Huawei Ascend supportUSE_AMD: AMD supportUSE_TSM: TsingMicro supportUSE_ENFLAME: Enflame supportUSE_SUNRISE: Sunrise AI supportUSE_PPU: PPU backend supportUSE_GLOO: GLOO supportUSE_MPI: MPI support
Device API and integration build controls include:
USE_SHMEM=1: enable the SHMEM Device API adaptor.SHMEM_HOME: SHMEM installation path; defaults to/usr/local/nvshmem.USE_ACCL_BAREX=1: enable the ACCL/Barex network adaptor.COMPILE_KERNEL=1: compile kernel-enabled Device API components and tests.HOST_CXX_STANDARD: override the host C++ language standard when required by the build environment.HOST_CXXFLAGS: add host compiler flags.JSON_INCLUDE_DIR: override the JSON header include directory.
The PPU integration commonly uses USE_PPU=1 USE_ACCL_BAREX=1; vendor runtime and transport settings are integration-specific and are not universal defaults.
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 the 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 communication libraries, respectively.