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
50 commits
Select commit Hold shift + click to select a range
51711aa
[nix] Fix out-of-date nix configuration (#780)
shirohasuki May 8, 2026
8ab719b
[midend] Add BatchMatmulTransposeBToIMELowering to lower-linalg-to-im…
Jiajun-Ji May 8, 2026
ba150ae
[benchmark][vir] Add LinalgBench for VIR dialect.
zhanghb97 May 10, 2026
e4478b7
[runtime] Support tiered KV cache DeepSeek R1 builds in buddy-codegen…
R-Tars May 14, 2026
f731125
[frontend] Add graph partitioning for parallel model compilation.
zhanghb97 May 20, 2026
0adcc27
[tools] Decouple buddy-cli and model build process.
zhanghb97 May 20, 2026
47612f7
[tools] Accelerate model compilation and weight generation.
zhanghb97 May 20, 2026
a904f0e
[examples] Add affine.parallel + vector ops example.
zhanghb97 May 20, 2026
a919b8c
[frontend] Use alloc and fill strategy for large constant tensor.
zhanghb97 May 21, 2026
079143a
[tools] Fix KV Cache generation for tiered inference.
zhanghb97 May 21, 2026
a63fc92
[tools] Accelerate model compilation for tiered inference.
zhanghb97 May 21, 2026
15d0fd8
[benchmark] Add initial ModelBench.
zhanghb97 May 24, 2026
e86f7ee
[tools] Add terminal UI utils.
zhanghb97 May 24, 2026
7c226df
[ci] Enable riscv release for py310/py311
trdthg May 7, 2026
7dbb07c
[ci] Update riscv cache dir
trdthg May 20, 2026
783861b
[midend] Add decode pass for matmul transpose-b vectorization (#786)
asdf1113 May 26, 2026
a04c274
[Frontend] Use fused pass for distributed DeepSeek inference (#787)
asdf1113 May 26, 2026
bc45e97
[Frontend] Add AddMM transpose fusion support (#785)
asdf1113 May 27, 2026
ef66b83
[GitHub] Update issue templates
zhanghb97 May 29, 2026
9483057
[ci] Weekly auto-release
trdthg May 28, 2026
9c5f944
[AME] Add XuanTie AME examples and README (#771)
Yranger Jun 1, 2026
eee0342
[backend] Add BOSC AME dialect and pass. (#755)
Yranger Jun 1, 2026
9e8820b
Use RuyiAI-Stack/llvm-project
trdthg May 29, 2026
c02163b
Bump LLVM to 61e6aaf15844
trdthg May 29, 2026
038ba1d
[test] Update splat to broadcast
trdthg May 30, 2026
8fca613
[test] Use python isinstance api instead of ir.XXXType.isinstance
trdthg May 30, 2026
8c174c1
[test] Update openmp path
trdthg May 30, 2026
0081814
[test] Try fix riscv BuddyJIT/pytorch_matrix_multiplication.py
trdthg May 30, 2026
933e0e2
[example] Try fix omp link for example
trdthg May 30, 2026
ae0a7dd
[frontend] Remove linalg.transpose_a|b
trdthg May 30, 2026
93b9e61
[midend] Fix generated ir module missed on arm
trdthg May 30, 2026
21b11f1
[ci] Trigger example test by label
trdthg May 31, 2026
6d88e55
[llvm] Try fix example segmentfault introduced by upstream llvm
trdthg Jun 1, 2026
68e354d
[ci] Skip arm64 on test-example
trdthg Jun 1, 2026
2388184
[ci] Update CI configuration to support LLVM source and build paths
trdthg Jun 3, 2026
7ae5d50
[backend] Migrate backend to upstream llvm
trdthg Jun 2, 2026
5281d74
[Examples] Update LLVM build instructions.(#801)
WuXintong123 Jun 3, 2026
244d390
[frontend][test] Add aten addcmul op
trdthg Jun 4, 2026
f00974d
[ci] Fix TestBuild being triggered twice
trdthg Jun 4, 2026
85eebbc
[ci] Run check-buddy on multi pytorch version
trdthg Jun 1, 2026
4983050
[ci] Use PR ref for triggered test-example workflows
trdthg Jun 5, 2026
1896801
[mlir] Use OpTy::create instead of OpBuilder::create
trdthg Jun 4, 2026
95b1a8e
[ci] Enable clang-tidy check
trdthg Jun 5, 2026
049a098
[Examples]BuddyStableDiffusion Output Correctness Fix (#803)
Old-cpu Jun 8, 2026
97041f0
[ci] Fix release doesn't create new page
trdthg Jun 8, 2026
c74fd3a
[ci] Fix release.sh check-buddy failed
trdthg Jun 8, 2026
e7f7604
[ci] Enable qwen3-0.6b and gemma4 test for riscv
trdthg Jun 5, 2026
5f92fc5
[ci] Enable multithread compile
trdthg Jun 9, 2026
e38d44b
[llvm] Bump llvm to commit 0af6fcef7510ff068f665441564b69bcc74db3f6
trdthg Jun 20, 2026
aa803d5
Merge branch 'buckyball' into main
shirohasuki Jun 22, 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
  •  
  •  
  •  
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Task
about: Create a task for implementation, documentation, testing, or maintenance work.
title: "[TASK] <brief task title>"
labels: ''
assignees: ''
type: Task

---

## Deliverables

<!-- List the concrete outputs expected from this task. -->

- A pull request (PR) ...
- Documentation / examples / tests ...
- Experimental results or validation report, if applicable.

## Task Description

<!-- Break down the task into several clear subtasks. -->

1. **Subtask 1**

- Describe what needs to be implemented or investigated.

## Timeline

- Coding Phase: YYYY-MM-DD – YYYY-MM-DD
- Code Review Begins: YYYY-MM-DD

If finished ahead of schedule, the review process may begin earlier.

## Notes

<!-- Add extra notes, constraints, related repositories, references, or reminders. -->
35 changes: 11 additions & 24 deletions .github/actions/checkout_llvm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@ inputs:
description: Path to the llvm-project checkout.
required: true

outputs:
llvm_src:
description: Path to the llvm-project checkout.
value: ${{ steps.checkout-llvm.outputs.llvm_src }}
llvm_commit:
description: LLVM commit pinned by the repository submodule entry.
value: ${{ steps.checkout-llvm.outputs.llvm_commit }}
cache_hash:
description: LLVM source hash derived from the llvm submodule commit and applied patch.
value: ${{ steps.checkout-llvm.outputs.cache_hash }}

runs:
using: composite
steps:
Expand All @@ -26,21 +15,19 @@ runs:
run: |
LLVM_SRC="${{ inputs.llvm-src }}"

LLVM_COMMIT=$(git ls-tree HEAD llvm | awk '{print $3}')
PATCH_HASH=$(shasum -a 256 "$GITHUB_WORKSPACE/riscv-jitlink.patch" | awk '{print $1}')
LLVM_HASH="${LLVM_COMMIT}-${PATCH_HASH:0:12}"
LLVM_COMMIT="$(git -C "$GITHUB_WORKSPACE" ls-tree HEAD llvm | awk '{print $3}')"
LLVM_URL="$(git config -f "$GITHUB_WORKSPACE/.gitmodules" submodule.llvm.url)"

if [ ! -d "$LLVM_SRC" ]; then
git clone https://community-ci.openruyi.cn/toolchain/llvm-project.git $LLVM_SRC
git clone "$LLVM_URL" "$LLVM_SRC"
else
git -C "$LLVM_SRC" remote set-url origin "$LLVM_URL"
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
git submodule sync --recursive
git -C "$LLVM_SRC" fetch origin "$LLVM_COMMIT"
git -C "$LLVM_SRC" checkout -f "$LLVM_COMMIT"
git -C "$LLVM_SRC" reset --hard HEAD
git -C "$LLVM_SRC" clean -fdx

echo "llvm_src=$LLVM_SRC" >> "$GITHUB_OUTPUT"
echo "llvm_commit=$LLVM_COMMIT" >> "$GITHUB_OUTPUT"
echo "cache_hash=$LLVM_HASH" >> "$GITHUB_OUTPUT"
"$GITHUB_WORKSPACE/scripts/apply_llvm_patches.sh" "$LLVM_SRC"
99 changes: 46 additions & 53 deletions .github/actions/ci-common/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,24 @@ inputs:
venv_deactivate:
description: Command used to deactivate the Python environment.
required: true
llvm-src:
description: Path to the llvm-project checkout.
required: true
llvm-build-root:
description: Path to the LLVM build cache root.
required: true

runs:
using: composite
steps:
- name: Prepare LLVM variables
shell: bash
run: |
set -euo pipefail

echo "LLVM_SRC=${{ inputs.llvm-src }}" >> "$GITHUB_ENV"
echo "LLVM_BUILD_DIR=${{ inputs.llvm-build-root }}/build" >> "$GITHUB_ENV"

- name: Prepare ENV (x64)
if: ${{ inputs.arch == 'x64' }}
shell: bash
Expand All @@ -24,10 +38,6 @@ runs:
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
Expand All @@ -42,10 +52,6 @@ runs:
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
Expand All @@ -59,9 +65,6 @@ runs:
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
Expand All @@ -71,44 +74,42 @@ runs:
pip install -r requirements.txt
${{ inputs.venv_deactivate }}

- name: Checkout LLVM source
id: setup-llvm
uses: ./.github/actions/checkout_llvm
with:
llvm-src: ${{ env.LLVM_SRC }}

- name: Check LLVM build cache
id: prepare-llvm-build
shell: bash
run: |
LLVM_SRC="${{ steps.setup-llvm.outputs.llvm_src }}"
LLVM_BUILD_DIR="${{ env.LLVM_BUILD_ROOT }}/${{ steps.setup-llvm.outputs.cache_hash }}"

echo "LLVM_SRC=${{ steps.setup-llvm.outputs.llvm_src }}" >> $GITHUB_ENV
echo "LLVM_BUILD_DIR=${{ env.LLVM_BUILD_ROOT }}/${{ steps.setup-llvm.outputs.cache_hash }}" >> $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" \
rm -rf "$LLVM_BUILD_DIR"

RUNTIMES_CMAKE_ARGS=()
RUNTIMES_CMAKE_ARGS_VALUE=""
if [ "${{ inputs.arch }}" = "riscv64" ]; then
GCC_INSTALL_DIR="$(dirname "$(g++ -print-libgcc-file-name)")"

RUNTIMES_CMAKE_ARGS_VALUE="-DCMAKE_C_FLAGS=--gcc-install-dir=${GCC_INSTALL_DIR}"
RUNTIMES_CMAKE_ARGS_VALUE="${RUNTIMES_CMAKE_ARGS_VALUE};-DCMAKE_CXX_FLAGS=--gcc-install-dir=${GCC_INSTALL_DIR}"
RUNTIMES_CMAKE_ARGS_VALUE="${RUNTIMES_CMAKE_ARGS_VALUE};-DCMAKE_HAVE_LIBC_PTHREAD=TRUE"
RUNTIMES_CMAKE_ARGS_VALUE="${RUNTIMES_CMAKE_ARGS_VALUE};-DCMAKE_USE_PTHREADS_INIT=TRUE"
RUNTIMES_CMAKE_ARGS_VALUE="${RUNTIMES_CMAKE_ARGS_VALUE};-DCMAKE_THREAD_LIBS_INIT="
fi
if [ -n "${RUNTIMES_CMAKE_ARGS_VALUE}" ]; then
RUNTIMES_CMAKE_ARGS=(-DRUNTIMES_CMAKE_ARGS="${RUNTIMES_CMAKE_ARGS_VALUE}")
fi

cmake -G Ninja -S "$LLVM_SRC/llvm" -B "$LLVM_BUILD_DIR" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
"${RUNTIMES_CMAKE_ARGS[@]}" \
-DLLVM_ENABLE_PROJECTS="mlir;clang" \
-DLLVM_ENABLE_RUNTIMES="openmp" \
-DLLVM_TARGETS_TO_BUILD="host;RISCV" \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCMAKE_BUILD_TYPE=RELEASE \
-DMLIR_ENABLE_BINDINGS_PYTHON=ON \
-DPython3_EXECUTABLE=$(which python3)
-DPython3_EXECUTABLE="$(which python)" \
-DPython_EXECUTABLE="$(which python)"

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

${{ inputs.venv_deactivate }}
Expand All @@ -125,27 +126,19 @@ runs:
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 \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DMLIR_DIR=$LLVM_BUILD_DIR/lib/cmake/mlir \
-DLLVM_DIR=$LLVM_BUILD_DIR/lib/cmake/llvm \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCMAKE_BUILD_TYPE=RELEASE \
-DBUDDY_MLIR_ENABLE_PYTHON_PACKAGES=ON \
-DBUDDY_BUILD_DEEPSEEK_R1_MODEL=OFF \
-DPython3_EXECUTABLE=$(which python3)
-DPython3_EXECUTABLE="$(which python)" \
-DPython_EXECUTABLE="$(which python)"

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
55 changes: 55 additions & 0 deletions .github/scripts/test_examples.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env bash
set -euo pipefail

arch="${1:?usage: .github/scripts/test_examples.sh <arch>}"

export PYTHONPATH="$PWD/build/python_packages:${PYTHONPATH:-}"

if [ "$arch" = "riscv64" ]; then
# The installed torchvision on riscv64 is outdated and causes compatibility
# issues with other modules.
pip uninstall torchvision -y

cmake -S . -B build \
-DBUDDY_QWEN3_EXAMPLES=ON \
-DBUDDY_GEMMA4_EXAMPLES=ON \
-DBUDDY_DEEPSEEKR1_EXAMPLES=ON \
-DBUDDY_ENABLE_PNG=ON

ccache -z
ninja -C build \
buddy-qwen3-0.6b-run \
buddy-gemma4-e2b-run \
buddy-deepseek-r1-cli
ccache -s
else
cmake -S . -B build \
-DBUDDY_BERT_EXAMPLES=ON \
-DBUDDY_DEEPSEEKR1_EXAMPLES=ON \
-DBUDDY_GEMMA4_EXAMPLES=ON \
-DBUDDY_LENET_EXAMPLES=ON \
-DBUDDY_MOBILENETV3_EXAMPLES=ON \
-DBUDDY_QWEN3_EXAMPLES=ON \
-DBUDDY_RESNET_EXAMPLES=ON \
-DBUDDY_STABLE_DIFFUSION_EXAMPLES=ON \
-DBUDDY_TRANSFORMER_EXAMPLES=ON \
-DBUDDY_ENABLE_PNG=ON

ccache -z
ninja -C build \
buddy-deepseek-r1-cli \
buddy-qwen3-0.6b-run \
buddy-gemma4-e2b-run \
transformer-runner \
buddy-bert-run \
buddy-lenet-run \
buddy-stable-diffusion-run \
buddy-mobilenetv3-run \
buddy-resnet-run
ccache -s
fi

ctest --test-dir "$PWD/build" \
-L example \
--output-on-failure \
--no-tests=error
Loading
Loading