[parsec-users] Sharing data of bodytrack

Christian Bienia cbienia at CS.Princeton.EDU
Thu May 7 00:14:59 EDT 2009


Dennis,

I've talked about this with Scott, the main author of the program at Intel.
Here's what he says about the TBB implementation:

>>>
I looked at the code.  To answer his question, yes you should be able to do
multiple frames at a time in the image processing stage (the
TBBtrackingModel object).   

As it is set up, in the TBB model, the mFGMaps and mEdgeMaps members from
the base class are not used - the FGMaps and EdgeMaps are dynamically
allocated in the pipeline tokens.  mCameras is shared, but is only read and
not written to so this is not a problem.  

The only thing that should need to be changed is the constructor for the
TBBTrackingModel.  Currently, it initializes its TBB pipeline base class
with the call to tbb::filter(serial).  This would need to be changed to
tbb::filter(parallel) to allow multiple tokens in-flight.  The parameter to
the pipeline.run() call could then be increased past one. 

This should work as far as I can tell, but I have not tried it.  I might try
it this afternoon.  I imagine it will overwhelm the memory bandwidth
quickly, but who knows?
<<<

He also added a second comment after some more code reading:

>>>
I just noticed a problem with the code and the changes below.
Unfortunately, reading the files is a sequential operation.  To do image
processing in parallel across frames would require breaking the first
pipeline stage into two stages.  The first stage would have to read the
files only and pass them to the second stage which could process them in
parallel.  Currently they are combined into one stage and so it must be a
serial stage.  This is not hard to do, but I have not implemented it. It
could be something to try.
<<<

I hope this is helpful for you.

- Chris


-----Original Message-----
From: parsec-users-bounces at lists.cs.princeton.edu
[mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of Dionysus
Sent: Wednesday, May 06, 2009 4:28 AM
To: PARSEC Users
Subject: Re: [parsec-users] Sharing data of bodytrack

Hello~

Thanks for replying~

The on-the-fly item number is set in the TrackingBenchmark/main.cpp
line 318 "pipeline.run(1)".
I have referred to the document of TBB and it seems like the parameter
of the pipeline.run is the on-the-fly item number.

I have another question here.
If I set this number higher, which means there could be multiple
frames processed on-the-fly in the pipeline.
Under this circumstances, would these frames share the same mCamera,
mFGMaps, and mEdgeMaps?
Or would these frames keep different mCamera, mFGMaps, and mEdgeMaps
and share these data structure inside their own pipeline stage?

Thanks for your patience

Dennis

2009/5/4 Christian Bienia <cbienia at cs.princeton.edu>:
>
> Hi Dennis,
>
> It seems you already found the most important shared data structures, the
> maps are pretty big. First of all, please keep in mind that the various
> parallelizations for bodytrack vary slightly. The one we use by default
and
> which is also described in the technical report is the pthreads version.
>
> I'm not sure why the limit of the pipeline is set to one, if I understand
> the location that you describe correctly it should be more. Can you tell
me
> which file and lines of code you refer to?
>
> - Chris
>
>
> -----Original Message-----
> From: parsec-users-bounces at lists.cs.princeton.edu
> [mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of Dionysus
> Sent: Saturday, May 02, 2009 6:05 AM
> To: PARSEC Users
> Subject: [parsec-users] Sharing data of bodytrack
>
> Hi~
>
> I have some problems about the sharing data of bodytrack.
> The technical report claims that the bodytrack has many sharing data.
> I have traced the TBB code of bodytrack for couple days.
> The bodytrack was divided into two filters of a pipeline,
> TrackingModel and ParticleFilter.
> I found only limited data sharing in the first filter TrackingModel.
> In the ParticleFilter, I found that the mCamera, mEdgeMaps, and
> mFGMaps are shared between task of the LogLikelihood function.
>
> I am wondering that if there are some other share data I have not
> figured out yet.
> Any help about this problem would be grateful.
>
> By the way, I am also curious about why the maximum item processed on
> the fly in the pipeline is set to one.
> Is there any problem if I set this value more than one?
>
> Thanks for reading
>
> Dennis
> _______________________________________________
> parsec-users mailing list
> parsec-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/parsec-users
>
> _______________________________________________
> parsec-users mailing list
> parsec-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/parsec-users
>
_______________________________________________
parsec-users mailing list
parsec-users at lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/parsec-users



More information about the parsec-users mailing list