Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Intel_C_3
Beginner
70 Views

TBB::pipeline : Unordered Execution of Serial Stages

Is it possible to have the pipeline process jobs in serial stages in FIFO order
rather than in the order they were created in the input filter? I have a pipeline
where I need to enforce serial access to a resource but not ordered access.
0 Kudos
4 Replies
Alexey_K_Intel3
Employee
70 Views

This is not possible yet, but we consider adding such functionality.

Can you describe your casein some more details? In particular, do you think you would get better performance with serial but unordered filter, and why.

Thanks.

Intel_C_3
Beginner
70 Views

My interest in using an unordered filter is in minimizing the latency between stages of the pipeline. I have a simple pipeline with three filters. The first and last are serial to ensure safe access to some global data structures. These stages take very little time relative to the middle filter. The middle filter is a parallel stage where all of the "real" work happens. The processing of tokens in the middle stage has a variable runtime for each token. I would like to ensure that if several short jobs finish the second stage that are not stuck waiting on a long job that started earlier to finish. It is important in my case to have the final stage record the results of the second stage jobs with low latency from the time of completion since the pipeline may be interrupted at any time. I hope this gives a since of why an unordered serial stage would be useful.
Alexey_K_Intel3
Employee
70 Views

This definitely sounds as a good argument for unordered serial stage.

At the moment, I only can promise that we will consider it, and I will let you know the decision. I think chances are good that this functionality is voted for a future release.

And since TBB is open-source, you always have the option to implement it on your own and contribute to the project :)

Alexey_K_Intel3
Employee
70 Views

For those interested in unordered serial stages in tbb::pipeline, this functionality has been implemented and is available in the recent development updates.
Reply