Skip to content

Support NumPy smoke on musl CPython#282

Merged
TRSWNCA merged 1 commit into
masterfrom
feat/numpy-support
Jul 13, 2026
Merged

Support NumPy smoke on musl CPython#282
TRSWNCA merged 1 commit into
masterfrom
feat/numpy-support

Conversation

@TRSWNCA

@TRSWNCA TRSWNCA commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR adds a musl-CPython NumPy smoke-test path for AlloyStack.

Main changes:

  • Add third_party/lib-python-numpy submodule integration for NumPy C-extension sources and import shims.
  • Add scripts/build_cxx_musl.py to prepare an x86_64-musl C++ runtime for NumPy C++ sources.
  • Add scripts/build_numpy_musl.py to build NumPy C extensions into libnumpy_musl.a.
  • Extend user/musl_cpython with a numpy feature that registers NumPy built-in extension modules and required CPython built-ins.
  • Add isol_config/musl_cpython_numpy.json and numpy_smoke workload.
  • Add scripts/sync_numpy_workloads.sh for syncing NumPy package files/workload into FAT images or mounted image_content.
  • Improve musl/CPython/NumPy build logging and make musl CPython build incremental.

Validation

The musl-py workloads and NumPy smoke workload have been run successfully locally.

NumPy smoke result:

numpy v1.25.0 imported
a = [1 2 3 4 5]
b = [10 20 30 40 50]
a + b = [11 22 33 44 55]
a * b = [ 10  40  90 160 250]
matrix:
[[1 2 3]
 [4 5 6]]
transpose:
[[1 4]
 [2 5]
 [3 6]]
matrix multiplication:
[[19 22]
 [43 50]]
mean: 3.0
sum: 15
max: 5

@TRSWNCA TRSWNCA left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed

@TRSWNCA TRSWNCA merged commit 6a82275 into master Jul 13, 2026
1 check passed
@TRSWNCA TRSWNCA deleted the feat/numpy-support branch July 13, 2026 08:35
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.

1 participant