Requirements#
This section includes requirements of using FlagGems, including supported platforms, models, dependencies, tools and other FlagOS component. FlagGems can be successfully installed and run only when all requirements are met.
Operating System#
FlagGems is primarily tested on Ubuntu. We recommend using a Linux virtual machine or Docker container for installation.
Supported hardware platforms#
The following table lists the supported hardware platforms:
Vendor |
Support status |
float16 |
float32 |
bfloat16 |
|---|---|---|---|---|
AIPU |
β (Partial support) |
β |
β |
β |
Huawei Ascend |
β (Partial support) |
β |
β |
β |
Cambricon |
β |
β |
β |
β |
Hygon |
β |
β |
β |
β |
Iluvatar |
β |
β |
β |
β |
klx |
β |
β |
β |
β |
MetaX |
β |
β |
β |
β |
Mthreads |
β |
β |
β |
β |
NVIDIA |
β |
β |
β |
β |
Python, PyTorch and Triton compatible versions#
Before running FlagGems, you need to install stable and compatible versions of Python, PyTorch, and Triton.
Running on non-NVIDIA hardware requires that the underlying dependenciesβPyTorch and the Triton compilerβare available and properly configured for the target platform.
There are two common ways to obtain compatible builds:
Request from Hardware Vendor. Hardware vendors typically maintain custom builds of PyTorch and Triton tailored to their chips. Contact the vendor to request the appropriate versions.
Explore the FlagTree Project. The FlagTree project offers a unified Triton compiler infrastructure that supports a range of AI chips, including NVIDIA and non-NVIDIA platforms. It consolidates vendor-specific patches and enhancements into a shared open-source backend, simplifying compiler maintenance and enabling multi-platform compatibility.
Note
FlagTree provides Triton only. A matching PyTorch build is still required separately. Some platforms may require additional setup or patching.
Dependencies#
FlagGems has the following build and runtime dependencies.
Build dependency#
The following table lists the build dependencies:
Dependency |
Version |
Description |
|---|---|---|
setuptools |
β₯ 64.0 |
|
scikit-build-core for C++ |
β₯ 0.11 |
|
pybind11 for C++ |
latest version |
|
torch |
β₯ 2.2.0 |
|
ninja |
latest version |
|
cmake |
latest version |
|
Runtime dependency#
The following table lists the runtime dependencies:
Dependency |
Version |
Description |
|---|---|---|
torch |
β₯ 2.2.0 |
|
packaging |
latest version |
Packaging involves bundling an application or library with its metadata, dependencies, and configuration files into a structured package (e.g., |
PyYAML |
latest version |
Simplifies YAML handling in Python. It provides straightforward APIs to load YAML data into Python objects and dump Python data to YAML files, commonly used for managing project configurations (e.g., model hyperparameters, environment settings). |
sqlalchemy |
latest version |
SQLAlchemy simplifies Python database interactions. Its ORM lets developers map Python classes to database tables, streamlining data CRUD operations (create, read, update, delete) while supporting multiple database backends (e.g., PostgreSQL, MySQL, SQLite). |