-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Future of the Boost.fiber back-end #1714
Comments
Our internal discussion didn't show much love for the fiber back-end. I'll submit a PR to remove the back-end. Until then this issue is open for anyone who wants to keep it. |
I wanted to run a quick benchmark of the fiber backend yesterday to compare it against other CPU backends but failed to make it scale across more than 1 core. The workdiv should have enough blocks and threads. Maybe the backend is already broken. Furthermore, the fiber backend requires us to build boost and is thus an annoying dependency. In the face of our limited maintenance resources, I see no strong reason to keep it. |
I'm not familiar with Fibers -- in the sense that I've read about it, but I've never had an occasion for using it. If there is no urgency in removing it, I would be interested in giving it a try and comparing it with the other CPU backends. As for the breakage, my suggestion would be
|
Please do so! I could not make it scale across more than one core in my quick test with @sliwowitz's random engine benchmark. |
Looking at the code of the Fibers implementation:
auto const blockThreadCount(blockThreadExtent.prod());
FiberPool fiberPool(blockThreadCount);
// Execute the blocks serially.
meta::ndLoopIncIdx(gridBlockExtent, boundGridBlockExecHost); So, if the observed behaviour is that the whole grid runs in a single OS thread, one block at a time, then it matches what the code and comments say. Indeed running multiple threads in parallel (one per block) could be an interesting extension. |
In fact, a useful extension could be the possibility to "mix and match" the grid-level and block-level scheduling algorithms:
Then one could pick the block-level and thread-level strategy to better suit the problem and hardware ?
|
Trying to get back on topic: is it correct that Fibers is the only single-thread CPU backend that supports thread-level synchronization primitives, like If that is the case, could you keep the (optional) Fibers back-end in Alpaka until an eventual Coroutine-based back-end is available ? |
Yes, the fiber backend only uses a single OS thread. There once was a ticket to scale this across multiple threads, not sure where this went. We should try to keep the fiber based backend in there as long as technically possible until we have a reasonabe replacement. |
This should be #22. |
Thank you for that investigation and summarizing the outcome! I did not have the time to look myself!
This is exactly what @psychocoderHPC has in mind for a long time and we discussed that today in the alpaka VC. Unfortunately, that requires a redesign and probably big overhaul of alpaka and we don't have the resources for this ATM. |
Good to have that confirmed! Thank you! |
I just touched |
From the CMS side, since we are not actively using it and we don't have any more Tony looking into it, I guess it can be dropped. Eventually we might look into an alternative implementation based on Argobots. |
While working on #1713 I discovered that the Boost.fiber back-end is broken when enabling C++20. This was fixed in their repository a few days ago but all stable versions including the current one are unusable with C++20.
So we can either:
Before someone puts any work into this: Do we want to continue to support Boost.fiber as a back-end? What is the use case? Which benefits does this back-end have over our OpenMP and TBB back-ends?
The text was updated successfully, but these errors were encountered: