mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 03:55:04 -05:00
refactor: rename ArbitraryFunction to UnivariateFunction
- the naming has always been confusing and recent changes to the code make this rename necessary for things to be clearer
This commit is contained in:
@@ -31,7 +31,7 @@ The float subgraph that was detected:
|
||||
|
||||

|
||||
|
||||
The simplified graph of operations with the float subgraph condensed in an `ArbitraryFunction` node:
|
||||
The simplified graph of operations with the float subgraph condensed in an `UnivariateFunction` node:
|
||||
|
||||

|
||||
|
||||
@@ -39,7 +39,7 @@ The simplified graph of operations with the float subgraph condensed in an `Arbi
|
||||
|
||||
The first step consists in detecting where we go from floating point computation back to integers. This allows to identify the potential terminal node of the float subgraph we are going to fuse.
|
||||
|
||||
From the terminal node, we go back up through the nodes until we find nodes that go from integers to floats. If we can guarantee the identified float subgraph has a single variable integer input then we can replace it by an equivalent ArbitraryFunction node.
|
||||
From the terminal node, we go back up through the nodes until we find nodes that go from integers to floats. If we can guarantee the identified float subgraph has a single variable integer input then we can replace it by an equivalent UnivariateFunction node.
|
||||
|
||||
An example of a non fusable computation with that technique is:
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ Traceback (most recent call last):
|
||||
File "/src/concrete/numpy/compile.py", line 103, in _compile_numpy_function_into_op_graph_internal
|
||||
raise ValueError(
|
||||
ValueError: <lambda> cannot be compiled as it has nodes with either float inputs or outputs.
|
||||
Offending nodes : <concrete.common.representation.intermediate.ArbitraryFunction object at 0x7f6689fd37f0>
|
||||
Offending nodes : <concrete.common.representation.intermediate.UnivariateFunction object at 0x7f6689fd37f0>
|
||||
```
|
||||
|
||||
## Manual export
|
||||
|
||||
Reference in New Issue
Block a user