Re: [eigen] Different computation time when using Eige

[ Thread Index | Date Index | More Archives ]


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.


On 2016-06-27 11:37, tuch s wrote:
I have used eigen to do the following computation in a deep learning
Code: Select all
<>  cur->i =
   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:

Mail converted by MHonArc 2.6.19+