Closed anneriet closed 2 years ago
A make of the OpenQL from scratch on my old Linux CentOS work station takes about 20 minutes. That takes too long so I'm looking for ways to reduce that.
You @anneriet wrote that the complete Eigen library is included but that only some of the header files are needed for unitary decomposition in the OpenQL compiler. Could you try to update making unitary decomposition so that it doesn't use the complete Eigen library?
I'm working on it, when only the necessary parts of the eigen library are included, the compilation time is about halved, so that would be 10 mins for you. That's better but still too long, so I am looking into other things (like pre-compilation), I'll open a pull-request once I've got something that is a significant enough improvement.
I'm involving Jeroen @jvanstraten in this issue since, if I remember well, also did some update to make unitary decomposition be compiled separately. I propose you both exchange ideas and do the update and keep us @razvnane and @jvansomeren posted.
See #325. It's for the modular branch, but it should be easy to backport. It just takes the entire ql::unitary class and sticks it in a separate compile unit, so only it needs to depend on Eigen at all, leaving a wrapper in its place. Of course that does nothing to reduce the compilation time of that compile unit, but because Eigen is taken out of the header file, all the other compile units don't have to compile Eigen as well, so overall it's much faster. Also, when nothing changes in unitary.cc or the headers it depends on, incremental recompilation can skip it entirely.
Anything you've done so far to reduce compile times of the unitary decomposition code itself should compound of course; halving what's left after #325's changes would be great.
Seems to be solved in 0.10.0
Because the complete Eigen library is included as a submodule, building OpenQL has become very slow. While this is not necessary, because only some of the header files of Eigen are needed for unitary decomposition and other algorithms.