Rayon alternatives #1072
Replies: 2 comments 2 replies
-
Looks like the thread pool, at least, is on the orx-parallel roadmap: orxfun/orx-parallel#82 Maybe it'd be worth asking the author about Wild's graph algorithms via discussion? Regarding |
Beta Was this translation helpful? Give feedback.
-
I filed an issue on the orx-parallel repo to ask about scopes. The situation with per-thread init functions looks better with orx-parallel than it is with rayon's |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Rayon serves us pretty well. We do have some problems though. For example, it runs the init closure passed to
try_for_each_init
once for each work item instead of once for each thread. This is pretty wasteful, since each call allocates a new arena, so for 32 threads we end up with about ~1000 arenas instead of 32. It's also hard to be sure what the overhead of rayon is unless we try other things.Unfortunately, we make so much use of rayon that switching to anything else is pretty hard. In addition to the usual
par_iter
, we also usepar_bridge
, join, scopes, spawn, scoped spawning and spawn_broadcast.I've just had a look at orx-parallel which looks interesting. The two main issues that I've observed, without actually trying to do any conversion, so there may be more are:
WorkQueue<T>
where some initial work could be added to the queue, then more work could be added to the queue in response to processing other items from the queue.Another possibility is chili. This is lower level and only provides
join
. We'd probably need some abstractions built on top of this before using it would be practical.There's a fork of rayon that uses chili. I'm not sure how actively this is being worked on. It doesn't have its own repository, but lives in a repository with other stuff. It also doesn't appear to support scopes or anything else that we could use to implement our graph algorithms.
Beta Was this translation helpful? Give feedback.
All reactions