You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Householder requires a future save and scalable threading framework. The usual choice for compute intensive threading in Rust is Rayon. It has the following advantages:
Optimised and well tested for CPU intensive loads.
Simple fork/join model.
Very powerful parallel iterators.
However, it is difficult in Rayon to model complex task graph dependencies. Many modern linear algebra algorithms use complex tasking models to optimise parallel execution beyond simple parallel matrix/matrix products.
A framework that is well suited for complex task dependencies is Tokio. Advantages of Tokio are:
Very widely used in the Rust community, well tested and future proof.
Support for async/await for complex task models.
Similar to Rayon a work-stealing runtime system.
However, Tokio is usually not recommended for CPU intensive loads but for I/O Intensive loads. There is even an explicit warning in the documentation that for CPU bound work one should use Rayon.
I tried to understand limitations of Tokio for CPU workloads better, but so far have failed to see what the problems are. There is even a very good Blog post describing how Tokio can be safely used for CPU intensive workloads.
The question is now Tokio or Rayon? There is an option to use both frameworks via something like tokio_rayon. But I rather want to avoid having to include two complex threading frameworks.
The text was updated successfully, but these errors were encountered:
Householder requires a future save and scalable threading framework. The usual choice for compute intensive threading in Rust is Rayon. It has the following advantages:
However, it is difficult in Rayon to model complex task graph dependencies. Many modern linear algebra algorithms use complex tasking models to optimise parallel execution beyond simple parallel matrix/matrix products.
A framework that is well suited for complex task dependencies is Tokio. Advantages of Tokio are:
However, Tokio is usually not recommended for CPU intensive loads but for I/O Intensive loads. There is even an explicit warning in the documentation that for CPU bound work one should use Rayon.
I tried to understand limitations of Tokio for CPU workloads better, but so far have failed to see what the problems are. There is even a very good Blog post describing how Tokio can be safely used for CPU intensive workloads.
The question is now Tokio or Rayon? There is an option to use both frameworks via something like tokio_rayon. But I rather want to avoid having to include two complex threading frameworks.
The text was updated successfully, but these errors were encountered: