Files
concrete/docs/dev/api/concrete.fhe.tfhers.tracing.md
2024-09-27 08:03:42 +02:00

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 tfhers
  • dtype_to (TFHERSIntegerType): tfhers integer type to convert to

Returns: Union[Tracer, int, ndarray]