mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
fix(compilation): use proper variable input constructor during lookup table generation
This commit is contained in:
@@ -406,7 +406,7 @@ class GenericFunction(IntermediateNode):
|
||||
)
|
||||
variable_input_dtype = cast(Integer, variable_input_dtype)
|
||||
|
||||
input_value_constructor = self.inputs[0].underlying_constructor
|
||||
input_value_constructor = self.inputs[variable_input_idx].underlying_constructor
|
||||
if input_value_constructor is None:
|
||||
logger.info(
|
||||
f"{self.__class__.__name__} input data type constructor was None, defaulting to int"
|
||||
|
||||
@@ -1088,6 +1088,20 @@ def test_compile_and_run_correctness__for_prog_with_tlu(
|
||||
),
|
||||
True,
|
||||
),
|
||||
pytest.param(
|
||||
lambda x: numpy.array([120, 60, 30], dtype=numpy.uint8) // x,
|
||||
{
|
||||
"x": EncryptedTensor(UnsignedInteger(3), shape=(2, 3)),
|
||||
},
|
||||
[numpy.random.randint(1, 2 ** 3, size=(2, 3)) for _ in range(10)],
|
||||
(
|
||||
[
|
||||
[1, 7, 6],
|
||||
[3, 2, 5],
|
||||
],
|
||||
),
|
||||
True,
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_compile_and_run_tensor_correctness(
|
||||
|
||||
Reference in New Issue
Block a user