Skip to content

Fix hardcoded path bug + add CI for the hardware-independent surface#1

Merged
Scottcjn merged 2 commits into
mainfrom
ci/software-only-checks
Jul 6, 2026
Merged

Fix hardcoded path bug + add CI for the hardware-independent surface#1
Scottcjn merged 2 commits into
mainfrom
ci/software-only-checks

Conversation

@Scottcjn

@Scottcjn Scottcjn commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Bug fix

camera/test_blur.py wrote its before/after PNGs to a hardcoded /home/scott/npu-linux-kit/camera/... path, which only works on the original machine. Changed it to write next to the script using the os.path.dirname(__file__) pattern the file already uses for sys.path. Still needs the real NPU + IRON toolchain to run end to end (import aie.iron), so I couldn't execute it, but the path fix is a one-line, low-risk portability correction.

CI

Every module in this kit sits on top of the open-xdna NPU stack (IRON/mlir-aie + Peano + a real XDNA1 chip), none of which exists on a GitHub-hosted runner. This CI covers what's actually checkable:

  • Byte-compiles all of camera/*.py (syntax only)
  • Installs requirements.txt (opencv-python-headless, onnxruntime, numpy, ml_dtypes, pyvirtualcam) in a clean venv - confirms the host-side deps resolve on Linux/x86_64
  • Runs each camera/*.py module and checks it gets through all of its own host-side imports and fails only at import aie.iron (the NPU-toolchain boundary). Any other failure mode is a real bug and fails CI.

I ran this exact sequence locally first: requirements.txt installs clean, and all six camera/*.py files (including test_blur.py after the path fix) fail only at the aie import, nothing earlier.

What this does NOT verify (said explicitly in the workflow comments)

  • Any 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 numbers in camera/README.md

Test plan

  • python -m compileall -q camera clean
  • pip install -r requirements.txt clean in a fresh venv
  • All 6 camera/*.py files fail only at ModuleNotFoundError: No module named 'aie', verified locally

test_blur.py wrote its before/after PNGs to a hardcoded
/home/scott/npu-linux-kit/camera/... path, which only worked on the
original author's machine. Write next to the script instead, using
the same os.path.dirname(__file__) pattern the file already uses for
sys.path.

Still needs the real NPU + IRON toolchain to actually run (import
aie.iron), so I can't execute this end to end here, but the path fix
itself is a one-line, low-risk portability correction.

Signed-off-by: Scott <scottbphone12@gmail.com>
Every module here is an application on top of the open-xdna NPU stack
(IRON/mlir-aie + Peano + a real XDNA1 NPU), none of which exists on a
GitHub-hosted runner. This CI covers what's left:

- byte-compiles all of camera/*.py (syntax only)
- installs requirements.txt (opencv-python-headless, onnxruntime,
  numpy, ml_dtypes, pyvirtualcam) in a clean venv, confirming the
  host-side deps resolve on Linux/x86_64
- runs each camera/*.py module and asserts it gets through all of its
  own host-side imports and fails only at "import aie.iron" (the NPU
  toolchain boundary) - any other failure is a real bug and fails CI

I ran this exact sequence locally first: requirements.txt installs
clean, and all six camera/*.py files (including test_blur.py after the
path fix) fail only at the aie import, nothing earlier.

This does not and cannot verify any effect actually running on the
NPU, camera/kernels/blur3x3.cc compiling (needs the Peano AIE2
cross-compiler), or the measured FPS numbers in camera/README.md.

Signed-off-by: Scott <scottbphone12@gmail.com>
@Scottcjn Scottcjn merged commit 8cca4d2 into main Jul 6, 2026
1 check passed
@Scottcjn Scottcjn deleted the ci/software-only-checks branch July 6, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants