New week, new Rust! What are you folks up to?
I am planning to replace "Naive School Grade" Matrix Multiplication Algorithm with Strassen's Algoritm in my Pure Rust From Scratch Machine Learning Library.
What is your goal? Strassen's algorithm is interesting from a mathematical point of view. If you want to learn how to achieve better performance, that mostly comes down to re-organizing the "naive" O(n^3) algorithm to exploit the memory hierarchy and maximize parallelism. In my work on an ML library, I found research publications from the BLIS project helpful to understand how this works (some notes here).
I also love this article for an accessible introduction to ML performance (it is about GPUs, but the same ideas apply to CPUs, just to a lesser degree).
My goal is performance for sure. I will check the pages you mentioned.
Been working on improving the clipper2 crate. It exposes the functionality of the C++ Clipper2 library via FFI.
Since starting on this project tt has been an challenging journey exposing C++ functionality as C types, then FFI bindings to Rust. I tried to find a way to bind std::vector to Rust Vec types in a zero copy manner, but ultimately I found some ready made C wrappers for Clipper2 which I ended up using for now even if it might not be as efficient.
A lot left to learn around FFI.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.