diff --git a/frontends/concrete-python/concrete/fhe/compilation/module.py b/frontends/concrete-python/concrete/fhe/compilation/module.py index 77b7a61a9..ca5aa40c1 100644 --- a/frontends/concrete-python/concrete/fhe/compilation/module.py +++ b/frontends/concrete-python/concrete/fhe/compilation/module.py @@ -670,6 +670,13 @@ def statistics(self) -> Dict: } return statistics + @property + def server(self) -> Server: + """ + Get the server used by the runtime. + """ + return self.runtime.server + def functions(self) -> Dict[str, FheFunction]: """ Return a dictionnary containing all the functions of the module. diff --git a/frontends/concrete-python/tests/compilation/test_program.py b/frontends/concrete-python/tests/compilation/test_program.py index 11e52a244..52001089b 100644 --- a/frontends/concrete-python/tests/compilation/test_program.py +++ b/frontends/concrete-python/tests/compilation/test_program.py @@ -71,10 +71,11 @@ def dec(x): composable=True, verbose=True, ) - Module.compile( + compiled = Module.compile( {"inc": inputset, "dec": inputset}, configuration, ) + assert isinstance(compiled.server, fhe.Server) def test_compiled_clear_call(helpers):