mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
fix(benchmarks): resolve inputset and dtype related issues
This commit is contained in:
@@ -30,7 +30,7 @@ def main():
|
||||
engine = hnp.compile_numpy_function(
|
||||
function_to_compile,
|
||||
{"x": x},
|
||||
[(np.random.randint(0, 2 ** input_bits, size=(3, 2)),) for _ in range(32)],
|
||||
[np.random.randint(0, 2 ** input_bits, size=(3, 2)) for _ in range(32)],
|
||||
compilation_configuration=BENCHMARK_CONFIGURATION,
|
||||
)
|
||||
# bench: Measure: End
|
||||
|
||||
@@ -23,7 +23,7 @@ def main():
|
||||
engine = hnp.compile_numpy_function(
|
||||
function_to_compile,
|
||||
{"x": x},
|
||||
[(i,) for i in range(2 ** input_bits)],
|
||||
range(2 ** input_bits),
|
||||
compilation_configuration=BENCHMARK_CONFIGURATION,
|
||||
)
|
||||
# bench: Measure: End
|
||||
|
||||
@@ -26,7 +26,7 @@ def main():
|
||||
inputs = []
|
||||
labels = []
|
||||
for _ in range(100):
|
||||
sample_x = np.random.randint(0, 2 ** 3, size=(3,))
|
||||
sample_x = np.random.randint(0, 2 ** 3, size=(3,), dtype=np.uint8)
|
||||
|
||||
inputs.append([sample_x])
|
||||
labels.append(function_to_compile(*inputs[-1]))
|
||||
@@ -26,7 +26,7 @@ def main():
|
||||
inputs = []
|
||||
labels = []
|
||||
for _ in range(100):
|
||||
sample_x = np.random.randint(0, 2 ** 3, size=(3,))
|
||||
sample_x = np.random.randint(0, 2 ** 3, size=(3,), dtype=np.uint8)
|
||||
|
||||
inputs.append([sample_x])
|
||||
labels.append(function_to_compile(*inputs[-1]))
|
||||
@@ -18,7 +18,7 @@ def main():
|
||||
engine = hnp.compile_numpy_function(
|
||||
function_to_compile,
|
||||
{"x": x},
|
||||
[(i,) for i in range(24, 2 ** 6)],
|
||||
range(24, 2 ** 6),
|
||||
compilation_configuration=BENCHMARK_CONFIGURATION,
|
||||
)
|
||||
# bench: Measure: End
|
||||
|
||||
@@ -18,7 +18,7 @@ def main():
|
||||
engine = hnp.compile_numpy_function(
|
||||
function_to_compile,
|
||||
{"x": x},
|
||||
[(i,) for i in range(2 ** 3)],
|
||||
range(2 ** 3),
|
||||
compilation_configuration=BENCHMARK_CONFIGURATION,
|
||||
)
|
||||
# bench: Measure: End
|
||||
|
||||
@@ -21,7 +21,7 @@ def main():
|
||||
engine = hnp.compile_numpy_function(
|
||||
function_to_compile,
|
||||
{"x": x},
|
||||
[(i,) for i in range(2 ** max_precision - 42)],
|
||||
range(2 ** max_precision - 42),
|
||||
compilation_configuration=BENCHMARK_CONFIGURATION,
|
||||
)
|
||||
# bench: Measure: End
|
||||
|
||||
@@ -21,7 +21,7 @@ def main():
|
||||
engine = hnp.compile_numpy_function(
|
||||
function_to_compile,
|
||||
{"x": x},
|
||||
[(random.randint(0, 2 ** max_precision - 1 - 42),) for _ in range(128)],
|
||||
[random.randint(0, 2 ** max_precision - 1 - 42) for _ in range(128)],
|
||||
compilation_configuration=BENCHMARK_CONFIGURATION,
|
||||
)
|
||||
# bench: Measure: End
|
||||
|
||||
@@ -21,7 +21,7 @@ def main():
|
||||
engine = hnp.compile_numpy_function(
|
||||
function_to_compile,
|
||||
{"x": x},
|
||||
[(random.randint(0, 2 ** max_precision - 1 - 42),) for _ in range(128)],
|
||||
[random.randint(0, 2 ** max_precision - 1 - 42) for _ in range(128)],
|
||||
compilation_configuration=BENCHMARK_CONFIGURATION,
|
||||
)
|
||||
# bench: Measure: End
|
||||
|
||||
@@ -21,7 +21,7 @@ def main():
|
||||
engine = hnp.compile_numpy_function(
|
||||
function_to_compile,
|
||||
{"x": x},
|
||||
[(random.randint(0, 2 ** max_precision - 1 - 42),) for _ in range(128)],
|
||||
[random.randint(0, 2 ** max_precision - 1 - 42) for _ in range(128)],
|
||||
compilation_configuration=BENCHMARK_CONFIGURATION,
|
||||
)
|
||||
# bench: Measure: End
|
||||
|
||||
@@ -21,7 +21,7 @@ def main():
|
||||
engine = hnp.compile_numpy_function(
|
||||
function_to_compile,
|
||||
{"x": x},
|
||||
[(random.randint(0, 2 ** max_precision - 1 - 42),) for _ in range(128)],
|
||||
[random.randint(0, 2 ** max_precision - 1 - 42) for _ in range(128)],
|
||||
compilation_configuration=BENCHMARK_CONFIGURATION,
|
||||
)
|
||||
# bench: Measure: End
|
||||
|
||||
@@ -21,7 +21,7 @@ def main():
|
||||
engine = hnp.compile_numpy_function(
|
||||
function_to_compile,
|
||||
{"x": x},
|
||||
[(random.randint(0, 2 ** max_precision - 1 - 42),) for _ in range(128)],
|
||||
[random.randint(0, 2 ** max_precision - 1 - 42) for _ in range(128)],
|
||||
compilation_configuration=BENCHMARK_CONFIGURATION,
|
||||
)
|
||||
# bench: Measure: End
|
||||
|
||||
@@ -21,7 +21,7 @@ def main():
|
||||
engine = hnp.compile_numpy_function(
|
||||
function_to_compile,
|
||||
{"x": x},
|
||||
[(random.randint(0, 2 ** max_precision - 1 - 42),) for _ in range(128)],
|
||||
[random.randint(0, 2 ** max_precision - 1 - 42) for _ in range(128)],
|
||||
compilation_configuration=BENCHMARK_CONFIGURATION,
|
||||
)
|
||||
# bench: Measure: End
|
||||
|
||||
@@ -21,7 +21,7 @@ def main():
|
||||
engine = hnp.compile_numpy_function(
|
||||
function_to_compile,
|
||||
{"x": x},
|
||||
[(random.randint(0, 2 ** max_precision - 1 - 42),) for _ in range(128)],
|
||||
[random.randint(0, 2 ** max_precision - 1 - 42) for _ in range(128)],
|
||||
compilation_configuration=BENCHMARK_CONFIGURATION,
|
||||
)
|
||||
# bench: Measure: End
|
||||
|
||||
@@ -21,7 +21,7 @@ def main():
|
||||
engine = hnp.compile_numpy_function(
|
||||
function_to_compile,
|
||||
{"x": x},
|
||||
[(i,) for i in range(2 ** max_precision - 42)],
|
||||
range(2 ** max_precision - 42),
|
||||
compilation_configuration=BENCHMARK_CONFIGURATION,
|
||||
)
|
||||
# bench: Measure: End
|
||||
|
||||
@@ -21,7 +21,7 @@ def main():
|
||||
engine = hnp.compile_numpy_function(
|
||||
function_to_compile,
|
||||
{"x": x},
|
||||
[(i,) for i in range(2 ** max_precision - 42)],
|
||||
range(2 ** max_precision - 42),
|
||||
compilation_configuration=BENCHMARK_CONFIGURATION,
|
||||
)
|
||||
# bench: Measure: End
|
||||
|
||||
@@ -26,7 +26,7 @@ def main():
|
||||
inputs = []
|
||||
labels = []
|
||||
for _ in range(4):
|
||||
sample_x = np.random.randint(0, 2 ** 3, size=(3,))
|
||||
sample_x = np.random.randint(0, 2 ** 3, size=(3,), dtype=np.uint8)
|
||||
|
||||
inputs.append([sample_x])
|
||||
labels.append(function_to_compile(*inputs[-1]))
|
||||
|
||||
@@ -18,7 +18,7 @@ def main():
|
||||
engine = hnp.compile_numpy_function(
|
||||
function_to_compile,
|
||||
{"x": x},
|
||||
[(i,) for i in range(2 ** 4)],
|
||||
range(2 ** 4),
|
||||
compilation_configuration=BENCHMARK_CONFIGURATION,
|
||||
)
|
||||
# bench: Measure: End
|
||||
|
||||
@@ -18,7 +18,7 @@ def main():
|
||||
engine = hnp.compile_numpy_function(
|
||||
function_to_compile,
|
||||
{"x": x},
|
||||
[(i,) for i in range(2 ** 3)],
|
||||
range(2 ** 3),
|
||||
compilation_configuration=BENCHMARK_CONFIGURATION,
|
||||
)
|
||||
# bench: Measure: End
|
||||
|
||||
Reference in New Issue
Block a user