mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
extend the current tracing and compilation with convolution, which should compile to the FHELinalg.conv2d operation from the compiler
26 lines
934 B
Python
26 lines
934 B
Python
"""Module for compiling numpy functions to homomorphic equivalents."""
|
|
|
|
# Import differently to put at the top, and avoid circular import issues
|
|
from concrete.numpy.compile import (
|
|
compile_numpy_function,
|
|
compile_numpy_function_into_op_graph_and_measure_bounds,
|
|
)
|
|
from concrete.numpy.np_fhe_compiler import NPFHECompiler
|
|
from concrete.numpy.tracing import trace_numpy_function
|
|
|
|
from ..common.compilation import CompilationArtifacts, CompilationConfiguration
|
|
from ..common.data_types import (
|
|
Float,
|
|
Float16,
|
|
Float32,
|
|
Float64,
|
|
Integer,
|
|
SignedInteger,
|
|
UnsignedInteger,
|
|
)
|
|
from ..common.debugging import draw_graph, format_operation_graph
|
|
from ..common.extensions.convolution import conv2d
|
|
from ..common.extensions.multi_table import MultiLookupTable
|
|
from ..common.extensions.table import LookupTable
|
|
from ..common.values import ClearScalar, ClearTensor, EncryptedScalar, EncryptedTensor, TensorValue
|