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

Method for managing task results to provide to the next task. #278

Closed
Levi-Armstrong opened this issue Jan 21, 2021 · 5 comments
Closed
Labels
enhancement New feature or request

Comments

@Levi-Armstrong
Copy link
Contributor

We are currently using taskflow to support our robotic motion planning framework and one thing we are looking for is guidance on how best to pass the results of the preceding task to the next. We are currently looking at leveraging the tasks hash value for storing the results but for this to work the task needs to know which task resulted in the transition to lookup the results. Is it possible to know which was the previous task during execution? If not do you have guidance on how to manage task results when they are need by child tasks?

@Levi-Armstrong Levi-Armstrong changed the title Method managing task results to provide to next task. Method for managing task results to provide to the next task. Jan 21, 2021
@Levi-Armstrong
Copy link
Contributor Author

I have read through this discussion.

@tsung-wei-huang
Copy link
Member

Hi @Levi-Armstrong , this is indeed a design consideration in the very early stage of Taskflow. We do not support in-band data passing between tasks but ask users to manage data through their own data structures. The reason is as follows:

  • Data management is application-dependent. Indeed, task parallelism is more general than data parallelism.
  • It is very difficult to manage the data passing for multiple dependencies. For example, where to store the intermediate data is a big question for the framework.
  • I think data passing makes sense when it comes to pipeline, but not task graph parallelism.

So, the best way is to manage the data using client-side data structure. You will need to describe data dependencies through task dependencies.

@tsung-wei-huang
Copy link
Member

I believe this issue can be solved by attaching custom data to a task, which will be included in the next release v3.3.

Feel free to reopen this issue if necessary.

@Levi-Armstrong
Copy link
Contributor Author

@tsung-wei-huang This is great!. I am curious why a C void* versus C++ variant std::shared<void>?

@Levi-Armstrong
Copy link
Contributor Author

FYI @mpowelson and @marip8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants