bear
August 31, 2023, 2:19pm
1
Hi.
I was trying to set up concrete-python on a new computer, and was then trying to run some piece of code that I had from another computer. The compile time is veeeery slow for integers larger than 100, while on my older computer this was not any problem.
I wonder if there is some difference in the python implementation I am not aware of? It seems very strange that the exact same code have dramatic differences in compile and runtime. Small numbers seems not to be any trouble.
alex
August 31, 2023, 2:24pm
2
Hello,
Are you using the same version on both computers? what is the size in bits of your integers?
bear
August 31, 2023, 2:36pm
3
I think the version should be the same. Just downloaded the package via pip, that is why I am confused
The size of the integers are around 10 bits.
alex
August 31, 2023, 2:39pm
4
Just to be sure, could you try pip freeze
in both environments to check version.
Could you also describe both computers HW?
bear
August 31, 2023, 2:54pm
5
The version is 1.0.0 on the one machine, a old hp laptop, while it is 2.2.0 on the other, a newer hp laptop… I now realized…
alex
August 31, 2023, 2:57pm
6
It still strange, I would have preferred a speedup
Could you share a piece of code so that we could see what could lead to such a difference?
FYI, I made a similar post about slow compile times, and got some useful tips. Try taking a look here in the meantime.
Hi @lfolkerts ,
You have an O(n^2) algorithm and loops are unrolled. So lots and lots of operations are created for this circuit, which takes a lot of time to compile.
We’re aware of the issue, and it’s one of our goals to support loops efficiently in the near future!
As for your questions:
Is there any tips/tricks to speed up compilation time for my function?
You can try to tensorize the program!
def compare2(args, ranks):
for i in range(args.size - 1):
dist = (args[i] > arg…
2 Likes
bear
September 6, 2023, 8:34am
8
Thanks for the answer. However, I think there is some issue with the computer here that causes this. It worked on yet another computer that I tested…
Thanks for all help
1 Like