mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 03:55:04 -05:00
chore: remove manually set uint8 dtypes in tests as it's done automatically
This commit is contained in:
@@ -64,7 +64,7 @@ def test_conv2d(input_shape, weight_shape, strides, dilations, has_bias, helpers
|
||||
inputset = [np.random.randint(0, 4, size=input_shape) for i in range(100)]
|
||||
circuit = function.compile(inputset, configuration)
|
||||
|
||||
sample = np.random.randint(0, 4, size=input_shape, dtype=np.uint8)
|
||||
sample = np.random.randint(0, 4, size=input_shape)
|
||||
helpers.check_execution(circuit, function, sample)
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ def test_dot(size, helpers):
|
||||
right_function_circuit = right_function.compile(inputset, configuration)
|
||||
method_circuit = method.compile(inputset, configuration)
|
||||
|
||||
sample = np.random.randint(0, bound, size=(size,), dtype=np.uint8)
|
||||
sample = np.random.randint(0, bound, size=(size,))
|
||||
|
||||
helpers.check_execution(left_function_circuit, left_function, sample)
|
||||
helpers.check_execution(right_function_circuit, right_function, sample)
|
||||
|
||||
@@ -149,8 +149,8 @@ def test_matmul(lhs_shape, rhs_shape, bounds, helpers):
|
||||
lhs_function_circuit = lhs_function.compile(lhs_inputset, configuration)
|
||||
rhs_function_circuit = rhs_function.compile(rhs_inputset, configuration)
|
||||
|
||||
lhs_sample = np.random.randint(minimum, maximum, size=lhs_shape, dtype=np.uint8)
|
||||
rhs_sample = np.random.randint(minimum, maximum, size=rhs_shape, dtype=np.uint8)
|
||||
lhs_sample = np.random.randint(minimum, maximum, size=lhs_shape)
|
||||
rhs_sample = np.random.randint(minimum, maximum, size=rhs_shape)
|
||||
|
||||
helpers.check_execution(lhs_operator_circuit, lhs_operator, lhs_sample)
|
||||
helpers.check_execution(rhs_operator_circuit, rhs_operator, rhs_sample)
|
||||
|
||||
@@ -129,7 +129,7 @@ def test_reshape(shape, newshape, helpers):
|
||||
function_circuit = function.compile(inputset, configuration)
|
||||
method_circuit = method.compile(inputset, configuration)
|
||||
|
||||
sample = np.random.randint(0, 2**5, size=shape, dtype=np.uint8)
|
||||
sample = np.random.randint(0, 2**5, size=shape)
|
||||
|
||||
helpers.check_execution(function_circuit, function, sample)
|
||||
helpers.check_execution(method_circuit, method, sample)
|
||||
@@ -166,5 +166,5 @@ def test_flatten(shape, helpers):
|
||||
inputset = [np.random.randint(0, 2**5, size=shape) for i in range(100)]
|
||||
circuit = function.compile(inputset, configuration)
|
||||
|
||||
sample = np.random.randint(0, 2**5, size=shape, dtype=np.uint8)
|
||||
sample = np.random.randint(0, 2**5, size=shape)
|
||||
helpers.check_execution(circuit, function, sample)
|
||||
|
||||
@@ -159,7 +159,7 @@ def test_static_indexing(shape, function, helpers):
|
||||
inputset = [np.random.randint(0, 2**5, size=shape) for _ in range(100)]
|
||||
circuit = compiler.compile(inputset, configuration)
|
||||
|
||||
sample = np.random.randint(0, 2**5, size=shape, dtype=np.uint8)
|
||||
sample = np.random.randint(0, 2**5, size=shape)
|
||||
helpers.check_execution(circuit, function, sample)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user