mirror of
https://github.com/zama-ai/concrete.git
synced 2026-04-17 03:00:54 -04:00
1.7 KiB
1.7 KiB
module concrete.fhe.tfhers.tracing
Tracing of tfhers operations.
function to_native
to_native(value: Union[Tracer, TFHERSInteger]) → Union[Tracer, int, ndarray]
Convert a tfhers integer to the Concrete representation.
Args:
value(Union[Tracer, TFHERSInteger]): tfhers integer
Raises:
TypeError: wrong input type
Returns:
Union[Tracer, int, ndarray]: Tracer if the input is a tracer. int or ndarray otherwise.
function from_native
from_native(
value: Union[Tracer, int, ndarray],
dtype_to: TFHERSIntegerType
) → Union[Tracer, int, ndarray]
Convert a Concrete integer to the tfhers representation.
The returned value isn't wrapped in a TFHERSInteger, but should have its representation.
Args:
value(Union[Tracer, int, ndarray]): Concrete value to convert to tfhersdtype_to(TFHERSIntegerType): tfhers integer type to convert to
Returns: Union[Tracer, int, ndarray]