Skip to content
This repository was archived by the owner on Jul 20, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
3d4ed56
[runtime] Add initial runtime and cli.
zhanghb97 Mar 22, 2026
a3ab887
[CI] Fix cache hit issue.
zhanghb97 Mar 23, 2026
2014706
[IME] Add FP16 matmul support for Linalg->IME and unify aligned/non-a…
wujing215 Mar 24, 2026
08a32fe
[CLI] Add DeepSeek R1 inference runtime with interactive mode, KV cac…
sdh1014 Mar 31, 2026
ddc6e2a
[example] Use pretrained model for LeNet
trdthg Apr 7, 2026
4fa807f
[example] FIx OneDNN example
trdthg Apr 7, 2026
bd6333c
[CLI] DeepSeek R1 config-driven codegen path for buddy-cli (#735)
R-Tars Apr 7, 2026
06f605f
[Docs] Add guide for integrating new models with buddy-cli (#738)
R-Tars Apr 7, 2026
a2c9379
[package] Add runtime cli
trdthg Apr 7, 2026
bd7d261
[example] Fix stable-diffusion example
trdthg Apr 7, 2026
848297f
[package] Add cmake option BUDDY_PACKAGE_VERSION
trdthg Apr 8, 2026
2e9deac
[package] Add flatbuffers and transformers
trdthg Apr 8, 2026
4dc25d5
[examples] Fix OneDNN example.
zhanghb97 Apr 8, 2026
db33134
[examples] Use MemRef container.
zhanghb97 Apr 8, 2026
8ac202c
[runtime] Create directories for the operator library.
zhanghb97 Apr 8, 2026
7610aa1
[package] generate package version from BUDDY_PACKAGE_VERSION
trdthg Apr 8, 2026
1664981
[CLI] Make DeepSeek R1 model build optional and fix CI.
R-Tars Apr 9, 2026
3b4700f
[CLI] Fix macOS build
trdthg Apr 9, 2026
13d360d
[ci] Add arm64-macos
trdthg Apr 9, 2026
6d7e8a7
[ci] Enable pre-commit on new file changes
trdthg Apr 10, 2026
b2130b9
[style] end-of-file-fixer and trailing-whitespace
trdthg Apr 10, 2026
6122b08
[example] Add Gemma4-E2B end-to-end inference example (#748)
R-Tars Apr 11, 2026
3efcbaf
[cli] Add local model configuration option.
zhanghb97 Apr 11, 2026
0f758bb
[CI] Fix pre-commit workflow args for push vs pull_request.
zhanghb97 Apr 11, 2026
98de91f
[test] Exclude Gemma4 examples.
zhanghb97 Apr 11, 2026
0fd071f
[midend] Remove explicit zero-init in matmul vectorization decode pass.
zhanghb97 Apr 11, 2026
10d3c7a
[Frontend] Use tensor.generate for 1-D arange/iota lowering.
zhanghb97 Apr 12, 2026
e0b6963
[backend] Add Xuantie AME dialect and lowering pass. (#744)
Yranger Apr 13, 2026
2932185
[VIR] Initial Triton to VIR lowering path with matmul example
xlinsist Mar 25, 2026
00e4ff9
[VIR] Update Triton2Linalg examples
xlinsist Mar 25, 2026
eb9e2e5
[VIR] Extend linalg.reduce to 2D->1D fallback and enforce strict unsu…
xlinsist Mar 26, 2026
2230e6f
[VIR] Add math.sqrt vectorization
xlinsist Mar 26, 2026
e45142a
[VIR] Add vir.extf/truncf ops to enable extf/truncf vectorization
xlinsist Mar 26, 2026
16f5086
[VIR] Add vir.reduce and enable linalg.reduce vectorization
xlinsist Mar 26, 2026
482f373
[VIR] Add softmax/layernorm Triton2Linalg case-study
xlinsist Mar 26, 2026
f6efba6
[Tests] Fix Triton2Linalg in lit check
xlinsist Mar 27, 2026
b9a4aa1
[VIR] Preserve linalg-to-vir handling for zero-broadcast maps
xlinsist Apr 13, 2026
25d84d1
[VIR] Support Reduce 3D And Transpose (#745)
xbwcan Apr 13, 2026
0fbbd86
Remove unpublished Triton2Linalg example surface from the branch
xlinsist Apr 13, 2026
bcfd3aa
[VIR][Tests] Group VIR conversion coverage under a single test bucket
xlinsist Apr 13, 2026
434078d
[example] BuddyGemma4: adapt decode MLIR patch for tensor.generate lo…
R-Tars Apr 13, 2026
75b2416
[ci] Add example test
trdthg Apr 7, 2026
f2ba1b4
[VIR] Force the last dimension of VIR to be generated as a dynamic di…
xbwcan Apr 15, 2026
8d873cc
[ci] Fix test-example
trdthg Apr 7, 2026
ceb66d1
[DAP] Fix vectorize-dap vector.extract index type
xlinsist Apr 16, 2026
7cc25d7
[Midend] add lm head optimization for gemma model (#761)
GuoningHuang Apr 17, 2026
e542018
[llvm] Fix llvm/mlir tests on RISC-V.
zhanghb97 Apr 18, 2026
0f95896
[midend] Fix matmul_transpose_b vectorization.
zhanghb97 Apr 18, 2026
5d7a6b2
[vir] Fix clamp_with_maxnumf_minnumf test case.
zhanghb97 Apr 18, 2026
1efc721
[vir] Fix default vector register width on RISC-V.
zhanghb97 Apr 18, 2026
4a3518f
[examples] Modify the vector examples for RISC-V.
zhanghb97 Apr 18, 2026
4f5df74
[midend] Gate matmul-transpose-b vectorization to safe static sizes (…
GuoningHuang Apr 18, 2026
5ae0cee
[frontend] Add high-performance pass to graph compilation.
zhanghb97 Apr 18, 2026
9a51505
[test] Resolve multiple copies of the OpenMP issue.
zhanghb97 Apr 18, 2026
901db66
[rax] Add support for cross-compiling RISC-V RAX files. (#762)
jiaan-clone Apr 18, 2026
546259d
[docs] Update cross-compilation guide and submodule settings.
zhanghb97 Apr 19, 2026
5e26326
[frontend] Resolve OpenMP double-loading issue.
zhanghb97 Apr 19, 2026
8b3530a
[frontend] Upgrade Transformers to v5.5.0 and fix model import/infere…
Old-cpu Apr 19, 2026
17d332d
[runtime] Add torq-tile external matmul kernel.
zhanghb97 Apr 19, 2026
2ab06fa
[frontend] Add fallback for LLVM libomp.
zhanghb97 Apr 19, 2026
438295a
[runtime] Update model generation directory.
zhanghb97 Apr 19, 2026
8528644
[cmake] Fix Python package dependency for example tests.
zhanghb97 Apr 19, 2026
f843fe2
[frontend/tests] Fix unrealized cast lowering and parallelize ATen co…
sdh1014 Apr 21, 2026
2f35125
[ci] Fix ninja check-buddy failed
trdthg Apr 13, 2026
c361809
[ci] Enable test-example on riscv64
trdthg Apr 16, 2026
b5827e1
[example] Import model on RVV platform
trdthg Apr 16, 2026
12634ca
[frontend] Add graph partitioning, distributed TP execution, and RVV …
asdf1113 Apr 24, 2026
1d0b8cd
Merge branch 'buckyball' into main
shirohasuki Apr 27, 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: 3 additions & 3 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
# The basic usage is,
# clang-format -i -style=file PATH/TO/SOURCE/CODE
#
# The -style=file implicit use ".clang-format" file located in one of
# parent directory.
# The -style=file implicit use ".clang-format" file located in one of
# parent directory.
# The -i means inplace change.
#
# The document of clang-format is
# The document of clang-format is
# http://clang.llvm.org/docs/ClangFormat.html
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html

Expand Down
162 changes: 162 additions & 0 deletions .github/actions/ci-common/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
name: buddy-mlir build
description: Prepare the environment and build buddy-mlir.

inputs:
arch:
description: Target runner architecture.
required: true
venv_activate:
description: Command used to activate the Python environment.
required: true
venv_deactivate:
description: Command used to deactivate the Python environment.
required: true

runs:
using: composite
steps:
- name: Prepare ENV (x64)
if: ${{ inputs.arch == 'x64' }}
shell: bash
run: |
echo "CCACHE_DIR=$HOME/.ccache" >> $GITHUB_ENV
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
ccache -M 50G
echo "CCACHE_MAXSIZE=50G" >> $GITHUB_ENV

mkdir -p $HOME/actions-runner/workspace
echo LLVM_SRC=$HOME/actions-runner/workspace/llvm-project >> $GITHUB_ENV
echo LLVM_BUILD_ROOT=$HOME/actions-runner/workspace/llvm-cache >> $GITHUB_ENV

${{ inputs.venv_activate }}
pip install --upgrade pip
pip install -r requirements.txt
${{ inputs.venv_deactivate }}

- name: Prepare ENV (arm64)
if: ${{ inputs.arch == 'arm64' }}
shell: bash
run: |
echo "CCACHE_DIR=$HOME/.ccache" >> $GITHUB_ENV
echo "PATH=/opt/homebrew/opt/ccache/libexec:$PATH" >> $GITHUB_ENV
ccache -M 50G
echo "CCACHE_MAXSIZE=50G" >> $GITHUB_ENV

echo LLVM_SRC=$HOME/actions-runner/workspace/llvm-project >> $GITHUB_ENV
echo LLVM_BUILD_ROOT=$HOME/actions-runner/workspace/llvm-cache >> $GITHUB_ENV
mkdir -p $HOME/actions-runner/workspace

${{ inputs.venv_activate }}
pip install --upgrade pip
pip install -r requirements.txt
${{ inputs.venv_deactivate }}

- name: Prepare ENV (riscv64)
if: ${{ inputs.arch == 'riscv64' }}
shell: bash
run: |
echo "CCACHE_DIR=/home/jenkins/.ccache" >> $GITHUB_ENV
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
ccache -M 50G
echo "CCACHE_MAXSIZE=50G" >> $GITHUB_ENV
echo LLVM_SRC=/home/jenkins/src/llvm-project >> $GITHUB_ENV
echo LLVM_BUILD_ROOT=/home/jenkins/llvm-cache >> $GITHUB_ENV
mkdir -p /home/jenkins/src

${{ inputs.venv_activate }}
pip install -U pip setuptools wheel packaging
sed -i \
-e '1s/^/# /' \
requirements.txt
pip install -r requirements.txt
${{ inputs.venv_deactivate }}

- name: Setup LLVM build
id: prepare-llvm-build
shell: bash
run: |
LLVM_COMMIT=$(git ls-tree HEAD llvm | awk '{print $3}')
PATCH_HASH=$(shasum ./riscv-jitlink.patch | cut -d' ' -f1)

LLVM_BUILD_DIR=$LLVM_BUILD_ROOT/$LLVM_COMMIT-${PATCH_HASH:0:12}

mkdir -p $LLVM_BUILD_ROOT

if [ ! -d "$LLVM_SRC" ]; then
git clone https://community-ci.openruyi.cn/toolchain/llvm-project.git $LLVM_SRC
fi

git -C $LLVM_SRC fetch --all
git -C $LLVM_SRC reset --hard
git -C $LLVM_SRC clean -fdx
git -C $LLVM_SRC checkout $LLVM_COMMIT

git -C $LLVM_SRC apply $GITHUB_WORKSPACE/riscv-jitlink.patch

echo "LLVM_SRC=$LLVM_SRC" >> $GITHUB_ENV
echo "LLVM_COMMIT=$LLVM_COMMIT" >> $GITHUB_ENV
echo "LLVM_BUILD_DIR=$LLVM_BUILD_DIR" >> $GITHUB_ENV

if [ -f "$LLVM_BUILD_DIR/build/CMakeCache.txt" ] &&
grep -q "$LLVM_SRC" "$LLVM_BUILD_DIR/build/CMakeCache.txt"; then
echo "need-rebuild=false" >> $GITHUB_OUTPUT
else
echo "need-rebuild=true" >> $GITHUB_OUTPUT
fi

- name: Configure and Build LLVM
if: ${{ steps.prepare-llvm-build.outputs.need-rebuild == 'true' }}
shell: bash
run: |
${{ inputs.venv_activate }}
rm -rf $LLVM_BUILD_DIR
cmake -G Ninja -S $LLVM_SRC/llvm -B $LLVM_BUILD_DIR/build \
-DLLVM_ENABLE_PROJECTS="mlir;clang;openmp" \
-DLLVM_TARGETS_TO_BUILD="host;RISCV" \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCMAKE_BUILD_TYPE=RELEASE \
-DMLIR_ENABLE_BINDINGS_PYTHON=ON \
-DPython3_EXECUTABLE=$(which python3)

ccache -z
ninja -C $LLVM_BUILD_DIR/build check-clang check-mlir omp || true
ccache -s

${{ inputs.venv_deactivate }}

- name: Configure and Build buddy-mlir
shell: bash
run: |
${{ inputs.venv_activate }}
echo "---- CHECK LOCAL SUBMODULE ----"
ls -l llvm || true
git submodule status || true
rm -rf build
mkdir build
cd build

cmake -G Ninja .. \
-DMLIR_DIR=$LLVM_BUILD_DIR/build/lib/cmake/mlir \
-DLLVM_DIR=$LLVM_BUILD_DIR/build/lib/cmake/llvm \
-DLLVM_MAIN_SRC_DIR=$LLVM_SRC/llvm \
-DMLIR_MAIN_SRC_DIR=$LLVM_SRC/mlir \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCMAKE_BUILD_TYPE=RELEASE \
-DBUDDY_MLIR_ENABLE_PYTHON_PACKAGES=ON \
-DBUDDY_BUILD_DEEPSEEK_R1_MODEL=OFF \
-DPython3_EXECUTABLE=$(which python3)

ccache -z
ninja
ccache -s

${{ inputs.venv_deactivate }}

- name: Cleanup old LLVM build cache
if: ${{ always() }}
shell: bash
run: |
KEEP=3

cd $LLVM_BUILD_ROOT
ls -1dt */ | tail -n +$((KEEP+1)) | xargs -r rm -rf
Loading
Loading