NuMojo v0.9.0 is finally here!
It took a while :). This release is a solid step forward in correctness, execution consistency, and future accelerator support and also part of our push toward more consistent stable releases alongside Mojo itself.
Check out the changelog for full details.
Safer Views & Memory Semantics
We’ve reworked view handling to make NDArray safer and more predictable:
- Strict contiguity checks (
is_c_contiguous,is_f_contiguous, etc.) contiguous()now guarantees an owned C-contiguous copy- New
NDArray.offsetenables safe shared-buffer views without pointer shifting - Clearer semantics:
.copy()→ views,.deep_copy()→ allocations
(this may evolve further as we push view support across all of NDArray)
Unified Execution with HostExecutor
All core routines now run through the new HostExecutor. This is a step toward unifying SIMD execution, similar in spirit to NumPy ufuncs for host-side operations.
- SIMD-friendly
apply_unary,apply_binary, andapply_ternaryand predicate operations.
This provides consistent, optimized execution path across the library.
Device & Accelerator Foundations
We’re starting to lay the groundwork for GPU/accelerator support.
- New
Deviceabstraction (CPU/GPU, API similar totorch.device) - Split storage model:
HostStoragevsDeviceStorage - Unified container system for future device-agnostic arrays
This sets the stage for upcoming GPU support in NDArray. Expect some fun things in the next release!
Zero-Copy Interop via DLPack
Zero-copy interop is finally here via DLPack, currently tested with NumPy and PyTorch.
- Added DLPack support for seamless interoperability
- Zero-copy exchange with NumPy and other frameworks
- Benchmarks included to track performance regressions
Fixes & Improvements
- Better organized docs with user & developer guides and more examples!
- Corrected complex indexing behavior in
__getitem__ - Fixed memory leaks and device handling issues
- Updated for latest Mojo syntax and compatibility changes
- Expanded test coverage across indexing, views, logic ops, and more
Huge thanks to all contributors who helped push this release forward.
Four mojicians
(shivasankarka, forfudan, josiahls, birgerbr) contributed to this release.
Give it a try and let us know how we can improve!