feat: implement true Hopper TMA, cluster, FP8 GEMM and Winograd convo… #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| format-check: | |
| name: Format Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check C/C++/CUDA formatting | |
| uses: jidicula/clang-format-action@v4.13.0 | |
| with: | |
| clang-format-version: '17' | |
| check-path: 'src' | |
| fallback-style: 'Google' | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: pip | |
| - name: Check Python formatting | |
| run: | | |
| pip install ruff | |
| ruff check python/ | |
| ruff format --check python/ | |
| consistency-check: | |
| name: Entry Consistency Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Verify documented example files exist | |
| run: | | |
| python - <<'PY' | |
| from pathlib import Path | |
| required = [ | |
| Path('examples/01_elementwise/relu_example.cu'), | |
| Path('examples/03_gemm/gemm_benchmark.cu'), | |
| Path('examples/python/basic_usage.py'), | |
| ] | |
| missing = [str(path) for path in required if not path.exists()] | |
| if missing: | |
| raise SystemExit(f"Missing documented examples: {missing}") | |
| PY | |
| - name: Verify Python module naming is aligned | |
| run: | | |
| python - <<'PY' | |
| from pathlib import Path | |
| files = { | |
| 'python/bindings/bindings.cpp': 'NB_MODULE(hpc_ai_opt, m)', | |
| 'python/CMakeLists.txt': 'nanobind_add_module(hpc_ai_opt', | |
| 'examples/python/basic_usage.py': 'import hpc_ai_opt as opt', | |
| 'docs/python/index.rst': 'hpc_ai_opt', | |
| 'README.md': 'hpc_ai_opt', | |
| 'README.zh-CN.md': 'hpc_ai_opt', | |
| } | |
| for file_path, expected in files.items(): | |
| content = Path(file_path).read_text(encoding='utf-8') | |
| if expected not in content: | |
| raise SystemExit(f"Expected '{expected}' in {file_path}") | |
| PY | |
| - name: Verify CI scope is documented | |
| run: | | |
| python - <<'PY' | |
| from pathlib import Path | |
| readme = Path('README.md').read_text(encoding='utf-8') | |
| if 'does **not** currently provide full native CUDA build-and-test coverage' not in readme: | |
| raise SystemExit('README.md must describe the current CI scope clearly') | |
| PY | |
| docs: | |
| name: Build Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Doxygen | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y doxygen graphviz | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: pip | |
| - name: Install doc dependencies | |
| run: | | |
| pip install sphinx sphinx-rtd-theme breathe myst-parser sphinx-copybutton | |
| - name: Build Doxygen docs | |
| run: | | |
| if [ -f docs/Doxyfile ]; then | |
| cd docs && doxygen Doxyfile | |
| else | |
| echo "Doxyfile not found, skipping Doxygen" | |
| fi | |
| - name: Build Sphinx docs | |
| run: | | |
| if [ -f docs/python/conf.py ]; then | |
| cd docs/python && sphinx-build -b html . _build/html | |
| else | |
| echo "Sphinx config not found, skipping" | |
| fi | |
| ci-success: | |
| name: CI Success | |
| runs-on: ubuntu-latest | |
| needs: [format-check, consistency-check, docs] | |
| if: always() | |
| steps: | |
| - name: Check all jobs | |
| run: | | |
| if [[ "${{ needs.format-check.result }}" != "success" || "${{ needs.consistency-check.result }}" != "success" || "${{ needs.docs.result }}" != "success" ]]; then | |
| echo "One or more required jobs failed" | |
| exit 1 | |
| fi | |
| echo "All required jobs passed!" |