fix(benchmarks): resolve inputset and dtype related issues

This commit is contained in:
Umut
2021-12-03 16:31:32 +03:00
parent 222635200b
commit 5c3950407c
26 changed files with 19 additions and 19 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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]))

View File

@@ -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]))

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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]))

View File

@@ -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

View File

@@ -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