Add scipy and dependencies for Kalico hx711s-new tap filtering#201
Open
pdscomp wants to merge 15 commits into
Open
Add scipy and dependencies for Kalico hx711s-new tap filtering#201pdscomp wants to merge 15 commits into
pdscomp wants to merge 15 commits into
Conversation
✅ Build ArtifactsBranch:
|
Drops ~30% off numpy/scipy footprint by stripping debug info from
all .so files under ${PYTHON_SITEPACKAGES_DIR} using both
${HOST_PREFIX}strip and ${TARGET_PREFIX}strip to handle
cross-compiled artifacts.
Adds 'inherit strip-python-sos' so .so files under site-packages are stripped during do_install. Also prunes unused numpy submodules (Track B audit) and adds INSANE_SKIP for already-stripped.
Adds 'find ${D} -name '*.so' -type f -exec ${TARGET_PREFIX}strip --strip-unneeded {} \;'
to kalico do_install to strip debug info from the cross-compiled
c_helper.so and any other shared objects. Also adds INSANE_SKIP
'already-stripped' to suppress QA warnings.
…Kalico hx711s tap filter Drop-in replacement: 'import scipy.signal' works without any Kalico source changes. Only 4 scipy.signal functions needed by Kalico's sos_filter.py: - butter(N, Wn, btype, fs, output='sos') - iirnotch(w0, Q, fs) - tf2sos(b, a) - sosfilt_zi(sos) All 41 validation tests pass (atol=1e-9 vs real scipy 1.17.1).
The hx711s tap filter now uses scipy-shim instead. python3-scipy and its openblas dependency are no longer needed. Kalico's 'import scipy.signal' continues to work unchanged.
- Remove numpy 2.0 stub layer (numpy/_core) — not used at runtime - Remove _typing stubs — only needed at type-check time, not runtime - Remove all test directories (core/tests, lib/tests, linalg/tests, fft/tests) - Remove build-time artifacts: conftest.py, setup.py, matlib.py, __pycache__ - Replace numpy/lib/ with a minimal version: - __init__.py (only imports function_base) - function_base.py (real file — kaiser, interp) - twodim_base.py (real file — diag used by function_base.py) - _utils.py (minimal stub — set_module decorator) - _version.py (minimal stub) - All other lib/ submodules (index_tricks, histograms, npyio, type_check, nanfunctions, shape_base, stride_tricks, ufunclike, arraysetops, arraypad, arrayterator, format, scimath, recfunctions, mixins) are never used by kalico and removed Result: numpy installed size 19.0 MB → 8.7 MB (-10.3 MB, ~55% reduction). All 5638 tasks pass, image builds clean.
✅ Build ArtifactsBranch:
|
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the scipy scientific computing stack and its dependencies needed for the Kalico
hx711s-newbranch tap filtering module.Changes
Build verification
Full image build completed successfully (5977 tasks).
Confirmed in rootfs manifest: openblas, python3-numpy, python3-scipy.
Why not meta-python-ai?
Cherry-picked only the needed recipes from meta-python-ai (scarthgap) to avoid pulling in LLVM and 100+ AI/ML packages we don't need.