Files
concrete/docs/dev/api/concrete.compiler.md
2025-04-29 08:53:21 +01:00

4.8 KiB

module concrete.compiler

Compiler submodule.

Global Variables

  • utils: # Part of the Concrete Compiler Project, under the BSD3 License with Zama Exceptions.

See https://github.com/zama-ai/concrete/blob/main/LICENSE.txt for license information.

  • compilation_feedback: # Part of the Concrete Compiler Project, under the BSD3 License with Zama Exceptions.

See https://github.com/zama-ai/concrete/blob/main/LICENSE.txt for license information.

  • compilation_context: # Part of the Concrete Compiler Project, under the BSD3 License with Zama Exceptions.

See https://github.com/zama-ai/concrete/blob/main/LICENSE.txt for license information.

  • tfhers_int

function init_dfr

init_dfr()

Initialize dataflow parallelization.

It is not always required to initialize the dataflow runtime as it can be implicitely done during compilation. However, it is required in case no compilation has previously been done and the runtime is needed


function check_gpu_enabled

check_gpu_enabled()  bool

Check whether the compiler and runtime support GPU offloading.

GPU offloading is not always available, in particular in non-GPU wheels.


function check_gpu_available

check_gpu_available()  bool

Check whether a CUDA device is available and online.


function round_trip

round_trip(mlir_str: str)  str

Parse the MLIR input, then return it back.

Useful to check the validity of an MLIR representation

Args:

  • mlir_str (str): textual representation of an MLIR code

Raises:

  • TypeError: if mlir_str is not of type str

Returns:

  • str: textual representation of the MLIR code after parsing

class RangeRestrictionHandler

Handler to serialize and deserialize range restrictions


method flatten

flatten(obj, data)

method restore

restore(obj)

class KeysetRestrictionHandler

Handler to serialize and deserialize keyset restrictions


method flatten

flatten(obj, data)

method restore

restore(obj)