Skip to content
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

[FEA]: Support coroutine enabled edges between nodes #421

Open
2 tasks done
mdemoret-nv opened this issue Dec 13, 2023 · 0 comments
Open
2 tasks done

[FEA]: Support coroutine enabled edges between nodes #421

mdemoret-nv opened this issue Dec 13, 2023 · 0 comments
Labels
feature request New feature or request

Comments

@mdemoret-nv
Copy link
Contributor

Is this a new feature, an improvement, or a change to existing functionality?

New Feature

How would you describe the priority of this feature request

High

Please provide a clear description of problem this feature solves

With the addition of coroutine support for nodes, we can make nodes which body uses coroutines, but the channels/edges between nodes still uses boost fibers. This requires conversion code for every node to convert between fibers and coroutines for every edge.

Describe your ideal solution

In an ideal world, when connecting two nodes together, the edge connection code would determine if this was a fiber<->fiber, coroutine<->coroutine, or coroutine<->fiber connection. If and only if it was a heterogeneous connection, would it then place the fibers to coroutine conversion edge.

This would eliminate the need to use conversion code for every node and would still allow old fiber based nodes and new coroutine based nodes to coexist. Conversions would only be on an "as-needed" basis and the performance impact would be minimal. Long term, as fiber based nodes are phased out, no conversion code would be necessary allowing for ideal, coroutine only pipelines to function.

This will require a few changes to the existing edge system. A brief outline of the changes is listed below:

  • Update the edge interface to specify which type of edge the current instance is: fiber or coroutine
  • Add new functions to the channel interface which return awaitable objects for reading and writing
  • Create conversion edges which bridge the coroutine<->fiber and fiber<->coroutine gap
    • In an ideal world, one could create a channel type which worked for both coroutines and fibers. This would require recreating much of the boost channel code
  • Update the edge builder to determine heterogeneous connections and insert connector nodes where necessary.
  • More to come

Describe any alternatives you have considered

No response

Additional context

No response

Code of Conduct

  • I agree to follow MRC's Code of Conduct
  • I have searched the open feature requests and have found no duplicates for this feature request
@mdemoret-nv mdemoret-nv added the feature request New feature or request label Dec 13, 2023
@mdemoret-nv mdemoret-nv removed this from the 24.03 - Coroutine Improvements milestone Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant