lava-optimization icon indicating copy to clipboard operation
lava-optimization copied to clipboard

Speed of QP solver is very slow

Open ashishrao7 opened this issue 4 years ago • 2 comments

The functioning of the QP solver is extremely slow compared to a pure numpy implementation. This is in reference to Issue https://github.com/lava-nc/lava/issues/36

ashishrao7 avatar Nov 23 '21 19:11 ashishrao7

What is this story about? Could you provide more context?

  • Is this after Harry's fix?
  • How does this relate to the original issue and the first solution from Harry?
  • What do you expect to happen next?
  • ...

awintel avatar Nov 23 '21 21:11 awintel

Before Harry's fix in https://github.com/lava-nc/lava/pull/87, the CSP based implementation was 5000x slower than pure numpy implementation as pointed out in lava-nc/lava#36. After the fix there is an ~50x improvement in speed as compared to before but it's still 100x slower than a pure numpy implementation. (Intel Core i5-5257U with 8GB RAM, running Ubuntu 20.04.2 LTS with lava v0.2.0 vs v0.1.1) This issue was created to be a reference in lava-optimization for the speed improvement. An issue for further speed up (if possible and necessary) will be created separately.

ashishrao7 avatar Nov 24 '21 14:11 ashishrao7

@ashishrao7 what is the status of this issue? was there any progress or is the SW lava backend still slower than numpy?

GaboFGuerra avatar Jan 12 '23 18:01 GaboFGuerra

No the software backed is now much faster than it was when the issue was made. I think the speed issue after Harry's fix was because of a hacky primitive profiling tool that I had developed and was using. One also has to keep in mind that using get()/set() can also make it slow because of the serial nature of get()/set(). Closing this issue now.

ashishrao7 avatar Jan 16 '23 16:01 ashishrao7