Built-in performance analysis tools

I wrote a program consisting of multiple composable circuits. It works great, and I found some bottlenecks measuring the runtime of these sub-circuits. Now, I would be interested in a more fine-grained runtime analysis of my program to dig deeper and find the most interesting parts inside the sub-circuits for further optimization.

The GitHub README of Concrete mentions “Built-in performance analysis tools”, unfortunately I didn’t find something about them in the documentation. Can these tools help me find the bottlenecks of my program more precisely? How can I use them?

Thank you!

Hello @hallojs ,

You can take a look here Statistics | Concrete , basically the compiler give feedbacks about the circuit in the .statistics field of the ciruit object.

The statistics are static analysis and mostly allow you to understand the complexity of different part of your program. It not felects runtime parralelism etc… that may be crutial for performances.

To go deeply you can still use the options compiler_verbose_mode=True that show you all the intermediate transformation and IR that show dataflow task, loop parallelism etc…

Cheers.

1 Like

Hi @yundsi,

Thank you. I think that should help me go further!

I especially like the option to filter the statistics by tag. I’m not sure, but probably it would be a nice feature to also enable runtime measurements by tag. I have the feeling that’s a little more accessible than going through the whole "compiler_verbose_mode=True“ output.

Cheers!