Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
4bc9c4f
Albert/4.3.5 toolkit build
Sep 15, 2026
380b1dc
Merge branch 'albert/4.3.5_toolkit_build' into 'master'
Sep 15, 2026
1a9904d
Merge branch 'master' of github.com:MooreThreads/onnxruntime-musa
Sep 15, 2026
1a4a0d7
Merge branch 'master' of github.com:MooreThreads/onnxruntime-musa
Sep 16, 2026
a0c0302
Merge branch 'master' of github.com:MooreThreads/onnxruntime-musa
Sep 29, 2026
e074b79
Fix(bert infer RmsNorm bug)
Oct 9, 2026
06f8aeb
Merge branch 'albert/fix_bert_infer' into 'master'
Oct 9, 2026
476d67d
Fix(Dsin splitconcat fusion bug)
Oct 9, 2026
f3db201
Merge branch 'albert/fix_dsin_split_concat_bug' into 'master'
Oct 9, 2026
caadf3e
Fix(matmul fusion empty concat)
Oct 9, 2026
f986de7
Merge branch 'albert/fix_matmul_fusion_empty_concat' into 'master'
Oct 9, 2026
f85b88b
fix comment
Oct 12, 2026
56f13aa
feat(conv): support grouped and depthwise convolution
yichao-mt Sep 16, 2026
ddeeb0e
fix(tensor): stage mixed CPU inputs for Concat and add a nearest Resi…
yichao-mt Oct 13, 2026
9ad69dc
feat(conv): run fp32 NCDHW convolution through muDNN
yichao-mt Oct 13, 2026
5bcd62c
fix(elementwise): stage CPU boundary inputs for unary device kernels
yichao-mt Oct 13, 2026
42addf9
fix(fusion): stage CPU-produced inputs for SiluFusion and Reshape
yichao-mt Oct 13, 2026
787293e
fix(plugin): register MemcpyFromHost/MemcpyToHost kernels in the MUSA EP
yichao-mt Oct 13, 2026
fdeab64
feat(conv): support 1D NCL convolution
yichao-mt Oct 13, 2026
8c2395c
feat(resize): support linear/trilinear modes and the sizes input; dec…
yichao-mt Oct 13, 2026
3c6e8cb
fix(plugin): keep shape-metadata chains on the CPU and order small H2…
yichao-mt Oct 13, 2026
1895ebe
feat(plugin): extend kernel registrations down to opset 7-12
yichao-mt Oct 13, 2026
f17b75f
feat(plugin): handle old-opset semantics and widen opset upper bounds
yichao-mt Oct 13, 2026
1f2dfc5
feat(plugin): add Erf (opset 9+), fp16 LayerNorm, AveragePool, Sin/Co…
yichao-mt Oct 13, 2026
ae4d12a
fix(plugin): keep SplitUnsqueezeConcat runtime shape chain on the CPU
yichao-mt Oct 15, 2026
4a8bef4
test(plugin): cover SplitUnsqueezeConcat with a runtime-computed resh…
yichao-mt Oct 15, 2026
22bbcbe
fix(plugin): do not fold a Reshape with a runtime shape into SplitUns…
yichao-mt Oct 15, 2026
4323423
test(plugin): note the runtime-shape case is coverage, not a discrimi…
yichao-mt Oct 15, 2026
3b52d66
fix(fusion): read a device-resident Slice end for raw INT32 MHTA masks
yichao-mt Oct 18, 2026
704af17
fix(fusion): cache Tile repeats only when they are shape-derived
yichao-mt Oct 18, 2026
97506e8
fix(fusion): leave Tile with runtime repeats unfused
yichao-mt Oct 18, 2026
81ad26f
refactor(fusion): gate the MHTA Slice-end cache on provable shape inputs
yichao-mt Oct 18, 2026
a29f217
feat(fusion): recompute Tile repeats from fused input shapes
yichao-mt Oct 18, 2026
3c47ddc
fix(fusion): recompute Tile repeats without absorbing the chain
yichao-mt Oct 18, 2026
1186493
fix(plugin): let Slice read device-resident shape metadata
yichao-mt Oct 18, 2026
3e38acb
fix(fusion): key the MHTA Slice-end cache through shape-preserving ops
yichao-mt Oct 18, 2026
de62347
test(fusion): fix the Transpose perm input in the Slice-end shape test
yichao-mt Oct 18, 2026
07ef3d7
test(fusion): declare the output shape in the dynamic Slice-end test …
yichao-mt Oct 18, 2026
df399e8
fix(fusion): prove the MHTA Slice-end cache in the matcher, not at Co…
yichao-mt Oct 18, 2026
a37c7c8
feat(fusion): fuse runtime Tile repeats behind a same-build switch
yichao-mt Oct 18, 2026
2ff6d5b
fix(fusion): compile fixes for the hint plumbing and boundary key
yichao-mt Oct 18, 2026
85d26ea
fix(fusion): qualify FusionBoundaryKey in tile_concat_fusion.cc
yichao-mt Oct 18, 2026
4d84cc5
test(fusion): keep the CPU fallback for the dynamic mask-end tests
yichao-mt Oct 18, 2026
d2b90c0
diag(fusion): gate an MHTA Slice-end cache trace behind an env flag
yichao-mt Oct 18, 2026
c0415db
fix(fusion): pass the proved mask-end cache hint on the kBhsd path too
yichao-mt Oct 18, 2026
18b8aac
perf(kernel): make Reshape may-inplace instead of always copying
yichao-mt Oct 18, 2026
1fd50ba
test(kernel): fix the may-inplace assertions and enable the trace env
yichao-mt Oct 18, 2026
89171ea
perf(kernel): restore Reshape's hard input/output alias
yichao-mt Oct 18, 2026
1622d22
test(kernel): keep the may-inplace reuse output internal
yichao-mt Oct 18, 2026
b9abcec
perf(fusion): cache shared Tile repeats expressions within each execu…
yichao-mt Oct 19, 2026
ba7ced6
test(fusion): add opt-in per-execution Tile expression counters
yichao-mt Oct 19, 2026
62090a2
test(fusion): cover shared expression caching on the cache-only branch
yichao-mt Oct 19, 2026
e0e69c0
update doc
Oct 26, 2026
c94ec58
Feat(CI): add ci workflows
Oct 26, 2026
0d3f667
fix add scripts/ci
Oct 26, 2026
72b8de3
fix
Oct 26, 2026
bb04311
fix
Oct 26, 2026
f35d4f7
fix
Oct 27, 2026
f954b50
weekly
Oct 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
233 changes: 233 additions & 0 deletions .github/workflows/musa-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
name: MUSA CI

on:
pull_request:
workflow_dispatch:

permissions:
contents: read
actions: read

concurrency:
group: musa-ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
name: Unit Tests
runs-on: [self-hosted, musa, s5000]
timeout-minutes: 90
env:
CI_ASSETS: /data/ci-assets
PYTHONUNBUFFERED: "1"

steps:
- name: Checkout PR head
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 1
submodules: false

- name: Configure MUSA toolkit environment
run: |
set -euo pipefail
echo "/usr/local/musa/bin" >> "${GITHUB_PATH}"
{
echo "MUSA_HOME=/usr/local/musa"
echo "LD_LIBRARY_PATH=/usr/local/musa/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
echo "CPLUS_INCLUDE_PATH=/usr/include/c++/11:/usr/include/x86_64-linux-gnu/c++/11:/usr/include${CPLUS_INCLUDE_PATH:+:${CPLUS_INCLUDE_PATH}}"
} >> "${GITHUB_ENV}"

echo "MUSA_HOME=/usr/local/musa"
echo "PATH includes /usr/local/musa/bin in subsequent steps"
echo "LD_LIBRARY_PATH=/usr/local/musa/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
echo "CPLUS_INCLUDE_PATH=/usr/include/c++/11:/usr/include/x86_64-linux-gnu/c++/11:/usr/include${CPLUS_INCLUDE_PATH:+:${CPLUS_INCLUDE_PATH}}"

- name: Prepare ONNX Runtime headers
run: |
set -euo pipefail
test -d "${CI_ASSETS}/onnxruntime"
rm -rf third_party/onnxruntime
cp -a "${CI_ASSETS}/onnxruntime" third_party/onnxruntime

- name: Build plugin and wheel
run: |
set -euo pipefail
echo "Testing commit: $(git rev-parse HEAD)"
bash build.sh

- name: Install wheel
run: |
set -euo pipefail
python -m pip install --no-deps "onnxruntime==1.26.0"

shopt -s nullglob
wheels=(dist/onnxruntime_ep_musa-*.whl)
if (( ${#wheels[@]} != 1 )); then
echo "Expected exactly one MUSA wheel, found ${#wheels[@]}" >&2
printf ' %s\n' "${wheels[@]}" >&2
exit 1
fi
python -m pip install --no-deps --force-reinstall "${wheels[0]}"

- name: Run provider tests
run: bash test/run_all.sh

- name: Package build artifacts
run: |
set -euo pipefail
mkdir -p "${RUNNER_TEMP}/musa-build"
tar -C build -czf "${RUNNER_TEMP}/musa-build/musa-build.tar.gz" \
Release/libonnxruntime_providers_musa_plugin.so
tar -tzf "${RUNNER_TEMP}/musa-build/musa-build.tar.gz" >/dev/null

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: musa-build-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ runner.temp }}/musa-build/musa-build.tar.gz
if-no-files-found: error
retention-days: 7

model-zoo-cpu-ep-diff:
name: Model Zoo CPU EP Diff
needs: test
runs-on: [self-hosted, musa, s5000]
timeout-minutes: 720
env:
CI_ASSETS: /data/ci-assets
MODEL_ZOO_WORK: /data/ci-work/onnx-model-zoo-cpu-ep-diff-${{ github.run_id }}-${{ github.run_attempt }}
RESULTS_DIR: /data/ci-work/onnx-model-zoo-cpu-ep-diff-${{ github.run_id }}-${{ github.run_attempt }}/results
MUSA_VISIBLE_DEVICES: "0"
PYTHONUNBUFFERED: "1"

steps:
- name: Checkout PR head
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 1
submodules: false

- name: Configure MUSA toolkit environment
run: |
set -euo pipefail
echo "/usr/local/musa/bin" >> "${GITHUB_PATH}"
{
echo "MUSA_HOME=/usr/local/musa"
echo "LD_LIBRARY_PATH=/usr/local/musa/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
echo "CPLUS_INCLUDE_PATH=/usr/include/c++/11:/usr/include/x86_64-linux-gnu/c++/11:/usr/include${CPLUS_INCLUDE_PATH:+:${CPLUS_INCLUDE_PATH}}"
} >> "${GITHUB_ENV}"

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: musa-build-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ runner.temp }}/musa-build

- name: Extract build artifacts
run: |
set -euo pipefail
mkdir -p build
tar -C build -xzf "${RUNNER_TEMP}/musa-build/musa-build.tar.gz"

plugin="${GITHUB_WORKSPACE}/build/Release/libonnxruntime_providers_musa_plugin.so"
test -f "${plugin}"
echo "Head commit: $(git rev-parse HEAD)"
sha256sum "${plugin}"

- name: Prepare model zoo
run: |
set -euo pipefail
test -d "${CI_ASSETS}/onnx-model-zoo"
rm -rf "${MODEL_ZOO_WORK}"
mkdir -p "${MODEL_ZOO_WORK}"
cp -al "${CI_ASSETS}/onnx-model-zoo/." "${MODEL_ZOO_WORK}/"
rm -rf "${MODEL_ZOO_WORK}/cpp_runners"
cp -a "${CI_ASSETS}/onnx-model-zoo/cpp_runners" "${MODEL_ZOO_WORK}/cpp_runners"
mkdir -p "${RESULTS_DIR}"
test -f "${MODEL_ZOO_WORK}/run_all_onnx_cpu_ep_diff.sh"
test -f "${MODEL_ZOO_WORK}/cpp_runners/build_onnx_runner.sh"
test -f "/data/ci-assets/ort-sdk/onnxruntime-linux-x64-1.26.0/include/onnxruntime_c_api.h"

- name: Build model zoo CPU EP diff runner
run: |
set -euo pipefail
cd "${MODEL_ZOO_WORK}"
ORT_ROOT=/data/ci-assets/ort-sdk/onnxruntime-linux-x64-1.26.0/ \
bash cpp_runners/build_onnx_runner.sh
test -x cpp_runners/onnx_cpu_ep_diff

- name: Run MUSA-vs-CPU diff
run: |
set -euo pipefail
plugin="${GITHUB_WORKSPACE}/build/Release/libonnxruntime_providers_musa_plugin.so"
result_log="${RESULTS_DIR}/musa-cpu-ep-diff.log"
test -f "${plugin}"

cd "${MODEL_ZOO_WORK}"
set +e
MUSA_EP_LIBRARY="${plugin}" \
bash run_all_onnx_cpu_ep_diff.sh --ep musa -s 4 -q 16 2>&1 | tee "${result_log}"
pipeline_status=("${PIPESTATUS[@]}")
run_status=${pipeline_status[0]}
tee_status=${pipeline_status[1]}
set -e

if [[ -d "${MODEL_ZOO_WORK}/musa_cpu_diff_logs" ]]; then
rm -rf "${RESULTS_DIR}/musa_cpu_diff_logs"
cp -a "${MODEL_ZOO_WORK}/musa_cpu_diff_logs" "${RESULTS_DIR}/musa_cpu_diff_logs"
fi

summary="$(grep -E '^pass=[0-9]+ fail=[0-9]+ skip=[0-9]+ logs=' "${result_log}" | tail -n 1 || true)"
summary_pattern='^pass=([0-9]+) fail=([0-9]+) skip=([0-9]+) logs='
if [[ ! "${summary}" =~ ${summary_pattern} ]]; then
echo "Could not find the final CPU EP diff summary in ${result_log}" >&2
echo "Diff runner exit code: ${run_status}" >&2
exit 1
fi

pass_count="${BASH_REMATCH[1]}"
fail_count="${BASH_REMATCH[2]}"
skip_count="${BASH_REMATCH[3]}"

{
echo "## Model Zoo CPU EP Diff"
echo '```text'
echo "${summary}"
echo '```'
} >> "${GITHUB_STEP_SUMMARY}"

echo "CPU EP diff result: pass=${pass_count} fail=${fail_count} skip=${skip_count}"
if (( tee_status != 0 )); then
echo "Failed to write the CPU EP diff log (tee exit ${tee_status})" >&2
exit 1
fi
if (( fail_count != 0 )); then
echo "CPU EP diff gate failed: fail=${fail_count}" >&2
exit 1
fi
if (( run_status != 0 )); then
echo "CPU EP diff runner exited with code ${run_status} despite fail=0" >&2
exit "${run_status}"
fi
echo "CPU EP diff gate passed: fail=0 (PASS and SKIPPED are both accepted)"

- name: Upload CPU EP diff results
if: always()
uses: actions/upload-artifact@v4
with:
name: model-zoo-cpu-ep-diff-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ env.RESULTS_DIR }}/
if-no-files-found: ignore
retention-days: 7

- name: Cleanup model zoo work directory
if: always()
run: |
set -euo pipefail
case "${MODEL_ZOO_WORK}" in
/data/ci-work/onnx-model-zoo-cpu-ep-diff-*) rm -rf "${MODEL_ZOO_WORK}" ;;
*) echo "Refusing to remove unexpected path: ${MODEL_ZOO_WORK}" >&2; exit 1 ;;
esac
Loading
Loading