Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f6d2ad7
add chip adaption guides
skywalker688 Sep 23, 2026
c1928ee
update conf files
skywalker688 Sep 23, 2026
c575b39
chore: ignore __pycache__ and remove committed pyc files
skywalker688 Sep 23, 2026
1afe418
docs: trigger Read the Docs preview
skywalker688 Sep 23, 2026
3858bb2
docs: trigger Read the Docs preview for zh-CN
skywalker688 Sep 23, 2026
abb1803
Auto-update ModelScope documentation [$(TZ='Asia/Shanghai' date +'%Y-…
armstrongttwalker-alt Sep 28, 2026
c3d2892
chore: update model list from ModelScope
cheng874 Sep 28, 2026
6210017
chore: update model list from aihuanxin
cheng874 Sep 28, 2026
5325792
docs(flagcx): update flagcx documentation
skywalker688 Sep 29, 2026
438c918
docs(sglang): update sglang plugin documentation
skywalker688 Sep 29, 2026
e65c1ca
Merge branch 'main' into docs/chip-adaptation-guide
armstrongttwalker-alt Sep 29, 2026
a08f0ea
Merge pull request #514 from armstrongttwalker-alt/docs/chip-adaptati…
armstrongttwalker-alt Sep 29, 2026
f2f30e1
Merge pull request #515 from flagos-ai/update/model-list-aihuanxin
armstrongttwalker-alt Sep 29, 2026
2b8269d
Merge pull request #524 from flagos-ai/update/modelscope-docs-2026092…
armstrongttwalker-alt Sep 29, 2026
4c29b75
Merge pull request #525 from flagos-ai/update/model-list-modelscope
armstrongttwalker-alt Sep 29, 2026
a4a0ed8
Auto-update ModelScope documentation [$(TZ='Asia/Shanghai' date +'%Y-…
armstrongttwalker-alt Sep 29, 2026
958010f
docs(sglang): update sglang plugin zh documentation
skywalker688 Sep 29, 2026
9bd66ec
docs(flagcx): update flagcx en/zh documentation
skywalker688 Sep 29, 2026
6fac9b4
Merge pull request #528 from flagos-ai/update/modelscope-docs-2026092…
armstrongttwalker-alt Sep 29, 2026
f551547
Draft update
cheng874 Sep 29, 2026
79278a1
Merge pull request #530 from cheng874/FlagGems-sglang
cheng874 Sep 29, 2026
9e9e00b
chore: update model list from aihuanxin
cheng874 Sep 29, 2026
c34bc8c
Merge pull request #521 from cheng874/main
armstrongttwalker-alt Sep 30, 2026
e667a8d
chore: update model list from HuggingFace
cheng874 Sep 30, 2026
31a9e93
Merge pull request #531 from flagos-ai/update/model-list-aihuanxin
armstrongttwalker-alt Sep 30, 2026
6aee6bf
Merge pull request #532 from flagos-ai/update/model-list-huggingface
armstrongttwalker-alt Sep 30, 2026
c695ce3
Merge pull request #526 from armstrongttwalker-alt/docs/flagcx-2.2
armstrongttwalker-alt Sep 30, 2026
f251ee3
Merge pull request #533 from cheng874/main
armstrongttwalker-alt Sep 30, 2026
b74b965
Merge pull request #534 from cheng874/main
armstrongttwalker-alt Sep 30, 2026
5105441
Merge pull request #527 from armstrongttwalker-alt/docs/sglang-2.2
armstrongttwalker-alt Sep 30, 2026
34d7337
Update FlagTree comments and rename to Torch-FL
cheng874 Sep 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
CLAUDE.md
Makefile
docs/.claude/
docs/flagos_homepage/.claude/
docs/_build/
docs/dockerfile
make.bat
Expand All @@ -12,10 +13,15 @@ to-do/
.playwright-mcp/
dockerfile
dockerfile.bak
docs/flagos-homepage/AGENTS.md
docs/flagos-homepage/TODO.md
__pycache__/
*.py[cod]

# Playwright related files
docs/flagcicd_zh/.playwright-mcp/
docs/flagcicd_zh/static/node_modules/
docs/flagcicd_zh/static/package.json
docs/flagcicd_zh/static/package-lock.json
docs/flagcicd_zh/static/*.js

125 changes: 125 additions & 0 deletions docs/_ext/flagos_page_tags.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
"""Project-specific Sphinx helpers for the FlagOS homepage."""

import json

from sphinx.addnodes import only, toctree
from sphinx.transforms.post_transforms import SphinxPostTransform


def _frontmatter_tags(app, docname):
"""Return Sphinx tags declared in MyST frontmatter for one document."""
metadata = app.env.metadata.get(docname, {})
raw_tags = metadata.get("tags", [])

if isinstance(raw_tags, str):
try:
raw_tags = json.loads(raw_tags)
except json.JSONDecodeError:
raw_tags = [raw_tags]

if isinstance(raw_tags, str):
raw_tags = [raw_tags]

return [tag for tag in raw_tags if isinstance(tag, str)]


def _eval_condition_with_page_tags(app, condition, page_tags):
"""Evaluate an ``only`` expression with temporary page-level tags."""
added_tags = []
for tag in page_tags:
if not app.tags.has(tag):
app.tags.add(tag)
added_tags.append(tag)

app.tags._condition_cache.clear()
try:
return app.tags.eval_condition(condition)
finally:
for tag in added_tags:
app.tags.remove(tag)
app.tags._condition_cache.clear()


class PageFrontmatterOnlyTransform(SphinxPostTransform):
"""Apply ``only`` directives using tags from the current MyST page."""

default_priority = 49

def run(self, **kwargs):
docname = self.env.docname
page_tags = _frontmatter_tags(self.app, docname)
if not page_tags:
return

for node in list(self.document.findall(only)):
try:
keep = _eval_condition_with_page_tags(self.app, node.get("expr", ""), page_tags)
except Exception:
continue

if keep:
node.replace_self(node.children)
else:
node.parent.remove(node)


def _prune_inactive_only_toctrees(app, doctree):
"""Keep toctree relations in sync with active ``only`` branches.

Sphinx records ``toctree`` relationships while parsing a document, before
the ``only`` transform removes inactive branches. Rebuild the document's
include list from toctree nodes whose enclosing ``only`` conditions are
active. Page-level MyST ``tags`` frontmatter is treated as active while
evaluating the current document.
"""
docname = app.env.temp_data.get("docname")
if not docname or docname not in app.env.toctree_includes:
return

page_tags = _frontmatter_tags(app, docname)
active_includes = []
found_conditional_toctree = False

for toctree_node in doctree.findall(toctree):
current = toctree_node.parent
keep = True
is_conditional = False

while current is not None:
if isinstance(current, only):
is_conditional = True
expr = current.get("expr", "")
try:
if not _eval_condition_with_page_tags(app, expr, page_tags):
keep = False
break
except Exception:
# Let Sphinx's own only transform report malformed expressions.
pass
current = current.parent

if is_conditional:
found_conditional_toctree = True

if keep:
active_includes.extend(toctree_node.get("includefiles", []))

if found_conditional_toctree:
app.env.toctree_includes[docname] = active_includes

compact_toc = app.env.tocs.get(docname)
if compact_toc is not None:
for only_node in list(compact_toc.findall(only)):
expr = only_node.get("expr", "")
try:
keep = _eval_condition_with_page_tags(app, expr, page_tags)
except Exception:
continue
if not keep and only_node.parent is not None:
only_node.parent.remove(only_node)


def setup(app):
app.add_post_transform(PageFrontmatterOnlyTransform)
app.connect("doctree-read", _prune_inactive_only_toctrees)
return {"version": "0.1", "parallel_read_safe": True, "parallel_write_safe": True}
33 changes: 27 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ def get_project(projects):
"sphinx_tippy",
"sphinxcontrib.lightbox2", # click-to-enlarge / lightbox for images
"sphinx_tippy",
"sphinx_togglebutton"
"sphinx_togglebutton",
"flagos_page_tags"
]

# Check and add actually installed extensions
Expand Down Expand Up @@ -205,6 +206,13 @@ def get_project(projects):
"html_title": "FlagGems-sglang Documentation",
},
},
"flaggems_sglang_zh": {
"use_config_file": False,
"config": {
"project": "FlagGems-sglang 文档中心",
"html_title": "FlagGems-sglang 文档中心",
},
},
"flagdnn_en": {
"use_config_file": False,
"config": {
Expand Down Expand Up @@ -648,7 +656,14 @@ def get_project(projects):
# release = version

# Exclude patterns - exclude all other project directories
exclude_patterns = ["_build", "shared", "_includes"]
exclude_patterns = [
"_build",
"shared",
"_includes",
"chip_adaptation_guide/_shared",
"chip_adaptation_guide/TODO.md",
"chip_adaptation_guide_toctree_backup",
]
all_projects = list(multiproject_projects.keys())
for project in all_projects:
if project != docset:
Expand All @@ -675,6 +690,8 @@ def get_project(projects):

intersphinx_disabled_reftypes = ["*"]

myst_frontmatter_process = "yaml"

myst_enable_extensions = [
"dollarmath",
"amsmath",
Expand Down Expand Up @@ -753,6 +770,8 @@ def get_project(projects):
# Common static paths
html_static_path = ["_static", f"{docset}/_static"]
html_css_files = ["custom.css", "homepage.css"]
if docset == "flagos_homepage":
html_css_files.append("guide.css")
html_js_files = []

# html_logo = "img/logo.png"
Expand Down Expand Up @@ -794,15 +813,18 @@ def get_project(projects):
"use_download_button": False,
"repository_url": "https://github.com/flagos-ai/KernelGen",
"use_repository_button": True,
"secondary_sidebar_items": {},
"secondary_sidebar_items": {
"**": ["page-toc"],
"flagos_homepage/index": [],
},
"show_toc_level": 2,
"footer_start": ["copyright"],
"footer_end": [],
"show_sphinx": False,
"navbar_end": ["navbar-icon-links"]
}

# Update secondary sidebar items for flagos_homepage
html_theme_options["secondary_sidebar_items"]["flagos_homepage/index"] = []
# Keep the FlagOS homepage clean while enabling page-local TOC elsewhere.

# html_sidebars is only for PyData Sphinx Theme
html_sidebars = {}
Expand Down Expand Up @@ -904,4 +926,3 @@ def get_project(projects):
}

suppress_warnings = ["epub.unknown_project_files"]

38 changes: 23 additions & 15 deletions docs/flagcx_en/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Release Notes

- **[2026/06]** Released [v0.13](https://github.com/flagos-ai/FlagCX/releases/tag/v0.13.0-rc2.post1):
- **[2026/09]** Released [v.0.14.0](https://github.com/flagos-ai/FlagCX/releases/tag/v0.14.0):

- Adds SHMEM Device API support with `USE_SHMEM` and `SHMEM_HOME` build controls.
- Adds Scalar IR and Unified IR Device API test coverage, including split intra-node and inter-node test targets.
- Adds ACCL/Barex network adaptor support and PPU backend integration controls.
- Extends PyTorch plugin build detection for PPU and the canonical `USE_ILUVATAR` backend flag.
- Updates Iluvatar build flag documentation: use `USE_ILUVATAR`; `USE_ILUVATAR_COREX` remains only as a deprecated compatibility alias.
- Widens the lane-mask ABI to 64 bits for Device IR paths.
- Updates packaging and dependency handling, including the NCCL 2.27 documentation floor for NVIDIA/NCCL wrapper usage.

- **[2026/06]** Released [v.0.13.0](https://github.com/flagos-ai/FlagCX/releases/tag/v0.13.0):

- Introduces FlagCX P2P Engine for one-sided RDMA operations, designed for integration with transfer frameworks like NIXL.
- Adds IBRC P2P adaptor for InfiniBand-based P2P communication.
Expand All @@ -11,7 +21,7 @@
- Adds new one-sided RDMA operations: `flagcxPut`, `flagcxBatchPut`, `flagcxReadCounter`, `flagcxWaitCounter`.
- Optimizes RMA proxy with batched one-sided PUT operations for improved RDMA throughput.

- **[2026/05]** Released [v0.12](https://github.com/flagos-ai/FlagCX/releases/tag/v0.12.0):
- **[2026/05]** Released [v.0.12.0](https://github.com/flagos-ai/FlagCX/releases/tag/v0.12.0):

- Adds support for Sunrise AI accelerators, including device adaptor `ptpuAdaptor` and CCL adaptor `pcclAdaptor`.
- Extends PyTorch plugin support to PCCL backend.
Expand All @@ -23,32 +33,32 @@
- Adds bootstrap extension for enhanced rendezvous capabilities.
- Replaces C++17 features with C++11 equivalents for improved compatibility.

- **[2026/03]** Released [v0.11](https://github.com/flagos-ai/FlagCX/releases/tag/v0.11.0):
- **[2026/03]** Released [v.0.11.0](https://github.com/flagos-ai/FlagCX/releases/tag/v0.11.0):

- Enables kernel-based communication on heterogeneous platforms, including NVIDIA and Hygon.
- Adds support for both host-side and device-side one-sided communication semantics.
- Introduces adaptor plugin support, enabling dynamic loading of user-defined Device, CCL, and Net adaptor implementations.

- **[2026/02]** Released [v0.10](https://github.com/flagos-ai/FlagCX/releases/tag/v0.10.0):
- **[2026/02]** Released [v.0.10.0](https://github.com/flagos-ai/FlagCX/releases/tag/v0.10.0):

- Implements 11 chip-decoupled collective communication algorithms in uniRunner mode.
- Refactors Device Intra-/Inter-node API and integrates NCCL Device API support on NVIDIA platforms.
- Enhances usability with pip install support for FlagCX and an NCCL wrapper plugin for seamless adoption on NVIDIA platforms.

- **[2026/01]** Released [v0.9](https://github.com/flagos-ai/FlagCX/releases/tag/v0.9.0):
- **[2026/01]** Released [v.0.9.0](https://github.com/flagos-ai/FlagCX/releases/tag/v0.9.0):

- Adds support for Enflame, including `topsAdaptor` and `ecclAdaptor`.
- Extends flagcxCCLAdaptor to support symmetric operations.
- Introduces the NCCL Device API in ncclAdaptor to enable customized AllReduce operations.
- Refactors `glooAdaptor` to support both TCP and IB transports, with automatic NIC detection.

- **[2025/12]** Released [v0.8](https://github.com/flagos-ai/FlagCX/releases/tag/v0.8.0):
- **[2025/12]** Released [v.0.8.0](https://github.com/flagos-ai/FlagCX/releases/tag/v0.8.0):

- Enables intra-node zero-copy to improve data transfer efficiency for small messages.
- Supports a naive AllReduce implementation in uniRunner mode using a CPU-centric, device-assisted algorithm.
- Adds one-sided communication primitives via the new APIs flagcxHeteroPut and flagcxHeteroPutSignal.

- **[2025/11]** Released [v0.7](https://github.com/flagos-ai/FlagCX/releases/tag/v0.7.0):
- **[2025/11]** Released [v.0.7.0](https://github.com/flagos-ai/FlagCX/releases/tag/v0.7.0):

- Added support to TsingMicro, including device adaptor `tsmicroAdaptor` and CCL adaptor `tcclAdaptor`.
- Implemented an experimental kernel-free non-reduce collective communication
Expand All @@ -58,21 +68,21 @@
*AllReduce*, *AllGather*, *ReduceScatter*, and *AlltoAll*.
- Enhanced `flagcxNetAdaptor` with one-sided primitives (`put`, `putSignal`, `waitValue`) and added retransmission support for reliability improvement.

- **[2025/10]** Released [v0.6](https://github.com/flagos-ai/FlagCX/releases/tag/v0.6.0):
- **[2025/10]** Released [v.0.6.0](https://github.com/flagos-ai/FlagCX/releases/tag/v0.6.0):

- Implemented device-buffer IPC communication to support intra-node *SendRecv* operations.
- Introduced _device-initiated, host-launched device-side primitives_, enabling kernel-based communication directly from devices.
- Enhanced auto-tuning with 50% performance improvement on MetaX platforms for the *AllReduce* operations.

- **[2025/09]** Released [v0.5](https://github.com/flagos-ai/FlagCX/releases/tag/v0.5.0):
- **[2025/09]** Released [v.0.5.0](https://github.com/flagos-ai/FlagCX/releases/tag/v0.5.0):

- Added support for AMD GPUs, including a device adaptor `hipAdaptor` and a CCL adaptor `rcclAdaptor`.
- Introduced `flagcxNetAdaptor` to unify network backends, currently supporting socket, IBRC, UCX and IBUC (experimental).
- Enabled zero-copy device-buffer RDMA (user-buffer RDMA) to boost performance for small messages.
- Supported auto-tuning in homogeneous scenarios via `flagcxTuner`.
- Added test automation in CI/CD for PyTorch APIs.

- **[2025/08]** Released [v0.4](https://github.com/flagos-ai/FlagCX/releases/tag/v0.4.0):
- **[2025/08]** Released [v.0.4.0](https://github.com/flagos-ai/FlagCX/releases/tag/v0.4.0):

- Supported heterogeneous training of ERNIE4.5 (Baidu) on NVIDIA and Iluvatar GPUs with Paddle + FlagCX.
- Improved heterogeneous communication across arbitrary NIC configurations,
Expand All @@ -82,20 +92,20 @@
- Added an InterOp-level DSL to enable customized C2C algorithm design.
- Provided user documentation under `docs/`.

- **[2025/07]** Released [v0.3](https://github.com/flagos-ai/FlagCX/releases/tag/v0.3.0):
- **[2025/07]** Released [v.0.3.0](https://github.com/flagos-ai/FlagCX/releases/tag/v0.3.0):

- Integrated three additional native communication libraries: HCCL (Huawei), MUSACCL (Moore Threads) and MPI.
- Enhanced heterogeneous collective communication operations with pipeline optimizations.
- Introduced _device-side_ functions to enable device-buffer RDMA, complementing the existing _host-side_ functions.
- Delivered a full-stack open-source solution, FlagScale + FlagCX, for efficient heterogeneous prefilling-decoding disaggregation.

- **[2025/05]** Released [v0.2](https://github.com/flagos-ai/FlagCX/releases/tag/v0.2.0):
- **[2025/05]** Released [v.0.2.0](https://github.com/flagos-ai/FlagCX/releases/tag/v0.2.0):

- Integrated 3 additional native communications libraries, including MCCL (Moore Threads), XCCL (Mellanox) and DUCCL (BAAI).
- Improved 11 heterogeneous collective communication operations with automatic topology detection and
full support to single-NIC and multi-NIC environments.

- **[2025/04]** Released [v0.1](https://github.com/flagos-ai/FlagCX/releases/tag/v0.1.0):
- **[2025/04]** Released [v.0.1.0](https://github.com/flagos-ai/FlagCX/releases/tag/v0.1.0):

- Added 5 native communications libraries including CCL adaptors for
NCCL (NVIDIA), IXCCL (Iluvatar), and CNCL (Cambricon),
Expand All @@ -104,5 +114,3 @@
- Provided a full-stack open-source solution, FlagScale + FlagCX, for efficient heterogeneous training.
- Natively integrated into PaddlePaddle [v3.0.0](https://github.com/PaddlePaddle/Paddle/tree/v3.0.0),
with support for both dynamic and static graphs.


24 changes: 19 additions & 5 deletions docs/flagcx_en/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ pip install . -v --no-build-isolation
```shell
make <backend>=1 -j$(nproc)
```

where `<backend>` is one of:
- `USE_NVIDIA`: NVIDIA GPU support
- `USE_ILUVATAR_COREX`: Iluvatar Corex support
- `USE_ILUVATAR`: Iluvatar GPU support
- `USE_ILUVATAR_COREX`: deprecated compatibility alias for `USE_ILUVATAR`
- `USE_CAMBRICON`: Cambricon support
- `USE_METAX`: MetaX support
- `USE_MUSA`: Moore Threads support
Expand All @@ -34,11 +36,23 @@ where `<backend>` is one of:
- `USE_TSM`: TsingMicro support
- `USE_ENFLAME`: Enflame support
- `USE_SUNRISE`: Sunrise AI support
- `USE_PPU`: PPU backend 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.
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 `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.
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.
Loading
Loading