3 ms·
Out of curiosity, how do Spice/Chili/Rayon compare against the boring answer, OpenMP? I guess they must have some really neat capabilities.
by bee_rider 2y ago
Out of curiosity, how do Spice/Chili/Rayon compare against the boring answer, OpenMP?
I guess they must have some really neat capabilities.
- nestorD 2y agoRayon is known to have a higher overhead for the simple, and arguably most common case in numerical codes, static block size scheduling. Things get better, and you start to benefit from rayon, as work gets less balanced.
- thayne 2y agoWell, for one thing OpenMP is a c/c++ library, and chili and rayon are rust libraries. It's probably possible to use openmp from rust, but the interface probably isn't as nice, you would need some kind of translation layer from rust closures and iterators to the OpenMP API
- bee_rider 2y agoPlus Fortran! There’d definitely be some work translating Rust concepts over. It might be impossible/not worth it. But maybe it would be nice to have Rust, C, and Fortran all talking to the same runtime?
- marmaduke 2y agoThat’s what I was wondering. Iiuc openmp uses work stealing and the spice readme talks about the inefficiency of that: https://github.com/judofyr/spice?tab=readme-ov-file#work-stealing-and-its-inefficiencies https://github.com/judofyr/spice?tab=readme-ov-file#work-ste... so I’d be interested in seeing a benchmark.
- marmaduke 2y agoReading the implementation details kinda got me wanting to do a c11 threads based port.
- bee_rider 2y agoThanks. That’s some pretty clever stuff, with a nice intuitive description.
- jgtrosh 2y agoDoes OpenMP support work stealing? https://stackoverflow.com/a/36407220 https://stackoverflow.com/a/36407220 Answer: it's just an interface. Other implementations go as far as targetting GPU https://www.openmp.org/updates/openmp-accelerator-support-gpus/ https://www.openmp.org/updates/openmp-accelerator-support-gp... Could you implement OpenMP using Spice/Chili? Good question?