Re: [eigen] Different computation time when using Eige

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


The input data and output date are the same, but the running time is much different, some times very fast, some times much slower. 

The matrix is 128*1024, and the vector is 1024, I didn't know why the running time is so much different.

0.4 second and 2.1 second is just an example, maybe this time I can get the output using just 0.4 second, and the next time 1.9 second, or 2.1 second or some other value.




On Mon, Jun 27, 2016 at 5:54 PM, Christoph Hertzberg <chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi!

I'd need a bit more details to get any idea what is happening. E.g.:
Are the matrix sizes the same all the time (and how big are they)?
Does cur->i = this->bi involve resizing/memory allocation?
Is 0.4--2.1 seconds the time for all for computations or for each (or for multiple times)?
What Eigen version are you running?

The easiest way for us would be, if you could produce a minimal working example which exposes the problem.

Cheers,
Christoph



On 2016-06-27 11:37, tuch s wrote:
I have used eigen to do the following computation in a deep learning
programme,
Code: Select all
<https://forum.kde.org/viewtopic.php?f=74&t=133580&p=359022#>  cur->i =
this->bi;
   cur->i.noalias() += this->Wxi*xt + this->Whi*prev->h;
   cur->f = this->bf;
   cur->f.noalias() += this->Wxf*xt + this->Whf*prev->h;
   cur->o = this->bo;
   cur->o.noalias() += this->Wxo*xt + this->Who*prev->h;
   cur->u = this->bu;
   cur->u.noalias() += this->Wxu*xt + this->Whu*prev->h;

W* is a matrix, and h, f, i, o, u are all vectors.

But I tried several times with the same input data, the time consuming is
much different.
Some times it costs 0.4 second to get the output, but some times it cost
2.1 second to get the output.

  How can I solve this problem to get stable time cost ?


--
 Dipl. Inf., Dipl. Math. Christoph Hertzberg

 Universität Bremen
 FB 3 - Mathematik und Informatik
 AG Robotik
 Robert-Hooke-Straße 1
 28359 Bremen, Germany

 Zentrale: +49 421 178 45-6611

 Besuchsadresse der Nebengeschäftsstelle:
 Robert-Hooke-Straße 5
 28359 Bremen, Germany

 Tel.:    +49 421 178 45-4021
 Empfang: +49 421 178 45-6600
 Fax:     +49 421 178 45-4150
 E-Mail:  chtz@xxxxxxxxxxxxxxxxxxxxxxxx

 Weitere Informationen: http://www.informatik.uni-bremen.de/robotik





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/