Printing parameters for all test codes

How can I print the scheme parameters that are being used for the example codes provided? We are interested in the log q and n values but would appreciate being able to see all of the parameters being dynamically set by the concrete-compiler.

Hi @dsmolina,

You can use show_optimizer option to see the details of selected parameters:

import concrete.numpy as cnp
import numpy as np

@cnp.compiler({"x": "encrypted"})
def f(x):
    return x ** 2

inputset = range(10)
circuit = f.compile(inputset, show_optimizer=True)


--- Circuit
  7 bits integers
  0 manp (maxi log2 norm2)
  2734ms to solve
--- User config
  1.000000e+00 error per pbs call
  1.000000e-05 error per circuit call
--- Complexity for the full circuit
  5.280000e+02 Millions Operations
--- Correctness for each Pbs call
  1/107498 errors (9.302475e-06)
--- Correctness for the full circuit
  1/107498 errors (9.302475e-06)
--- Parameters resolution
  1x glwe_dimension
  2**13 polynomial (8192)
  895 lwe dimension 
  keyswitch l,b=6,3
  blindrota l,b=1,22
  wopPbs : false

Hope this helps!

1 Like

For the linear model testing, for instance the one found here: GitHub - zama-ai/concrete-ml at 898c811cdf9e1dc5a6da1bc9b00fc76adbd6e69c is there a simple way to use this show_optimizer value? I am having trouble finding documentation on the show_optimizer tool and figuring out how to use it with the linear/log model examples.

Hello !

I believe what you are looking for is the verbose_compilation parameter ! Setting it to True will display you information about the optimizer :grin:

You can take a look a this documentation page in order to know more about it !

Hope this answers your question :wink: