mad alex 1997
MModular
•Created by mad alex 1997 on 10/14/2024 in #community-showcase
Numojo V0.3 Update to Mojo 24.5, and a couple new features.
We’re excited to announce the release of NuMojo v0.3, with support for Mojo 24.5, a few new features, improvements, and fixes. Here's a quick overview of what's new:
Key New Features
- Magic System and MAX 24.5 Support: Enhanced compatibility with new systems, allowing for more efficient processing.
- Linear Algebra Functions: New functions like
solve
, inv
, and LU decomposition make it easier to solve equations and matrix inversions.
- New IO Module: Basic IO functionalities, including scientific float formatting and text file handling (loadtxt
, savetxt
).
- Extended Functionality: New methods such as diagflat
, trace
, itemset
, and more provide additional utility in working with NDArray.
Improvements
- Refined NDArray: Updated constructors, moved random initializers out, and improved overall behavior for data manipulation.
- Parallelization Fixes: Addressed parallel processing issues in key functions like matmul
, solve
, and inv
.
Additional Updates
- Multi-lingual support has been added for the README, workflows have been enhanced with unit tests and linting, and several outdated methods have been removed.
This release marks a major step forward in functionality, making NuMojo more versatile and efficient for users. Stay tuned for more updates!4 replies
MModular
•Created by mad alex 1997 on 8/28/2024 in #community-showcase
NuMojo V0.2 Release: Simplified Type Handling, New Features, and Enhanced Compatibility
We’re excited to announce NuMojo V0.2, featuring significant improvements and new features. This update simplifies data type management by removing
in_dtype
and out_dtype
parameters and introduces Rust-like data type aliases (e.g., f64
). Function overloads were implemented in arithmetic to allow easy symmetric usage of NDArray and Scalar types.
Array operations have seen major enhancements, including the introduction of the diagflat()
method for creating diagonal arrays, improved slicing functionality that aligns with NumPy, and added boolean masking for NDArrays. The NDArray
constructor now supports string array initialization, making array creation easier.
Documentation has been expanded with an updated README, improved function docstrings, and a new style guide. We’ve also introduced new test files compatible with the mojo test
framework, improving NuMojo’s reliability.
NuMojo V0.2 is compatible with Mojo 24.4 and requires no external dependencies.
For more details, check out the full changelog.5 replies
MModular
•Created by mad alex 1997 on 7/3/2024 in #community-showcase
NuMojo’s got NDArrays! 🥳
NuMojo has just released v0.1 adding many new features the largest of which is an N dimensional array type completely independent of
Tensor
. Our NDArray
has many features including
* Native Vectorization of arithmetic dunder operations +,-.*./
etc.
* Indexing with both integers and Slices (though mixed requires using Slice
explicitly due to Mojo parser limitations).
* sum
, mean
, stdev
both on axis and cumulative.
* A few different matmul
implementations.
* Basic integration trapz
.
* A few of the array creation routines from numpy: arange
, ones
, zeros
, identity
.
* Some Sorting functions: bubble_sort
, quick_sort
,and quick_sort_inplace
.
Our math functions were all migrated to NDArray, and a new Backend
was added. VectorizedParallelizedNWorkers
which allows the number of workers to be set as a parameter. I have found that setting the number of workers to between half, and three-quarters of the total number of cores provides a speed-up where default parallelization caused a slowdown (on WSL).
For those of you who are new to NuMojo Backend
is a trait that defines how calculations get carried out for many of the functions in our math module. The default is Vectorized
which uses SIMD vectorization. In the future, all numojo functions and data types will implement backends to enable easy switching between computational methods and eventually even hardware accelerators such as GPUs.
Example: The following calculates the square root of an array from 0 to 99, reshaped to 10x10, vectorized, and parallelized with 8 workers.
5 replies
MModular
•Created by mad alex 1997 on 6/1/2024 in #community-showcase
NuMojo Moved into a GitHub Organization Updated to Include access to different backends
NuMojo now exists under the Mojo Numerics and Algorithms group (MoNA).
For those of you that haven't heard of NuMojo, we are essentially trying to fill the same niche as numpy does for python. So far we have Tensor input versions of many of the standard library math functions. In the future we will have our own Tensor type and cover most, if not all, of the functionality of numpy and much of the functionality of scipy.
As for our new backend functionality, we added a number of function-only structs that conform to a trait called
Backend
. From my testing, Vectorized is the fastest and is therefore the default backend.
* Naive: Just loops
* Vectorized: SIMD vectorized
* VectorizedUnroll: SIMD vectorized with a user-defined unroll factor.
* Parallelized: parallel execution without vectorization
This allows users to easily select different backends for different parts of their code and will allow future development to target different backends both at the hardware level and the algorithm level across the entire package by building a backend struct that conforms to Backend
.
We are now accepting Feature requests, pull requests, and people who want to join our open-source organization. You can find our Discord on the GitHub page. I look forward to working with the members of this community to build the future of high-powered computing for Mojo and meeting people who love making math fast as much as I do.7 replies
MModular
•Created by mad alex 1997 on 5/13/2024 in #community-showcase
NuMojo - a library for numerical computing (like numpy and scipy)
Numojo intends to fill the non-AI numerical computing niche in the Mojo ecosystem, while still delivering all of the performance Mojo can bring. It is still new and a little rough around the edges. I am open for pull requests and would appreciate any discussions(either here or on Git Hub).
6 replies