Skip to content

[MXFP4] Patch fp4_utils.py rounding logic following #975 (#2249) #8

[MXFP4] Patch fp4_utils.py rounding logic following #975 (#2249)

[MXFP4] Patch fp4_utils.py rounding logic following #975 (#2249) #8

Workflow file for this run

name: Build and Deploy Documentation
on:
push:
branches:
- main
- docs-website
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
pull_request:
branches:
- main
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
workflow_dispatch:
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for versioning
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Install AITER (for autodoc)
run: |
# Install minimal dependencies for doc build
# (ROCm not needed for documentation generation)
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install -e . || true # Continue even if full install fails
- name: Build Sphinx documentation
run: |
cd docs
make html
- name: Upload documentation artifacts
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/_build/html/
retention-days: 7
deploy-docs:
needs: build-docs
runs-on: ubuntu-latest
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/docs-website')
permissions:
contents: write # For GitHub Pages deployment
steps:
- name: Download documentation artifacts
uses: actions/download-artifact@v4
with:
name: documentation
path: ./html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./html
cname: doc.aiter.amd.com # Custom domain
commit_message: 'docs: deploy documentation'
# Alternative: Deploy to AMD servers via SSH
# deploy-to-amd:
# needs: build-docs
# runs-on: ubuntu-latest
# if: github.event_name == 'push' && github.ref == 'refs/heads/main'
#
# steps:
# - name: Download documentation artifacts
# uses: actions/download-artifact@v4
# with:
# name: documentation
# path: ./html
#
# - name: Deploy to AMD doc server
# uses: easingthemes/ssh-deploy@v4
# with:
# SSH_PRIVATE_KEY: ${{ secrets.AMD_DOC_SERVER_KEY }}
# REMOTE_HOST: doc.aiter.amd.com
# REMOTE_USER: deploy
# SOURCE: "html/"
# TARGET: "/var/www/doc.aiter.amd.com/html"