elyanlabs's picture
Source snapshot of github.com/Scottcjn/npu-linux-kit@edee964
200d040 verified
Raw History Blame Contribute Delete
2.23 kB
name: CI (software-only)
# Every module in this kit is an application layer on top of the open-xdna
# NPU stack (IRON/mlir-aie + Peano + a real XDNA1 NPU + amdxdna driver).
# None of that toolchain or hardware exists on a normal GitHub-hosted
# runner, so this workflow does NOT and CANNOT verify:
# - any camera/*.py effect actually running on the NPU
# - camera/kernels/blur3x3.cc compiling (needs the Peano AIE2
# cross-compiler and aie_api headers)
# - any of the measured FPS/latency numbers in camera/README.md
#
# What IS hardware-independent and checked here:
# - every Python file parses (byte-compiles) cleanly
# - the host-side pip requirements (opencv, onnxruntime, numpy,
# ml_dtypes, pyvirtualcam) install cleanly on Linux/x86_64
# - each camera/*.py module imports up through all of ITS OWN
# host-side deps and fails only at `import aie.iron` (i.e. the NPU
# toolchain boundary), never earlier on a host-side bug. If a
# module fails on anything other than a missing `aie` module, that
# is a real bug this CI will catch.
on:
push:
branches: [main]
pull_request:
jobs:
syntax-and-host-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Byte-compile all Python sources (syntax only, no NPU/aie needed)
run: python -m compileall -q camera
- name: Install host-side requirements (no NPU stack involved)
run: pip install -r requirements.txt
- name: Import each camera module up to the NPU-toolchain boundary
run: |
set -e
fail=0
for f in camera/*.py; do
echo "--- $f ---"
out=$(python3 "$f" 2>&1) && { echo "ran to completion (unexpected without hardware, but not a failure)"; continue; }
if echo "$out" | grep -q "ModuleNotFoundError: No module named 'aie'"; then
echo "OK: fails only at the expected NPU-toolchain (aie) boundary"
else
echo "$out"
echo "FAIL: $f errored before reaching the aie import boundary"
fail=1
fi
done
exit $fail