mirror of
https://github.com/zama-ai/concrete.git
synced 2026-01-14 07:17:57 -05:00
2.3 KiB
2.3 KiB
module concrete.compiler.compilation_context
CompilationContext.
CompilationContext holds the MLIR Context supposed to be used during IR generation.
class CompilationContext
Support class for compilation context.
CompilationContext is meant to outlive mlir_context(). Do not use the mlir_context after deleting the CompilationContext.
method __init__
__init__(compilation_context: CompilationContext)
Wrap the native Cpp object.
Args:
compilation_context(_CompilationContext): object to wrap
Raises:
TypeError: if compilation_context is not of type _CompilationContext
method mlir_context
mlir_context() → Context
Get the MLIR context used by the compilation context.
The Compilation Context should outlive the mlir_context.
Returns:
MlirContext: MLIR context of the compilation context
method new
new() → CompilationContext
Build a CompilationContext.
Returns: CompilationContext