diff --git a/benchmarks/multi_table_lookup.py b/benchmarks/multi_table_lookup.py index d6a9cad08..2382f02a1 100644 --- a/benchmarks/multi_table_lookup.py +++ b/benchmarks/multi_table_lookup.py @@ -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 diff --git a/benchmarks/single_table_lookup.py b/benchmarks/single_table_lookup.py index 35ae894a1..5e2c2fe6b 100644 --- a/benchmarks/single_table_lookup.py +++ b/benchmarks/single_table_lookup.py @@ -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 diff --git a/benchmarks/x-index-0.py b/benchmarks/x_index_0.py similarity index 100% rename from benchmarks/x-index-0.py rename to benchmarks/x_index_0.py diff --git a/benchmarks/x-index-0-and-0.py b/benchmarks/x_index_0_and_0.py similarity index 100% rename from benchmarks/x-index-0-and-0.py rename to benchmarks/x_index_0_and_0.py diff --git a/benchmarks/x-index-1.py b/benchmarks/x_index_1.py similarity index 93% rename from benchmarks/x-index-1.py rename to benchmarks/x_index_1.py index bd9b35dea..e4075f75d 100644 --- a/benchmarks/x-index-1.py +++ b/benchmarks/x_index_1.py @@ -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])) diff --git a/benchmarks/x-index-one-colon.py b/benchmarks/x_index_1_colon.py similarity index 93% rename from benchmarks/x-index-one-colon.py rename to benchmarks/x_index_1_colon.py index 7b18f832d..ac3e33857 100644 --- a/benchmarks/x-index-one-colon.py +++ b/benchmarks/x_index_1_colon.py @@ -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])) diff --git a/benchmarks/x-index-colon.py b/benchmarks/x_index_colon.py similarity index 100% rename from benchmarks/x-index-colon.py rename to benchmarks/x_index_colon.py diff --git a/benchmarks/x-index-colon-2.py b/benchmarks/x_index_colon_2.py similarity index 100% rename from benchmarks/x-index-colon-2.py rename to benchmarks/x_index_colon_2.py diff --git a/benchmarks/x-index-colon-and-1.py b/benchmarks/x_index_colon_and_1.py similarity index 100% rename from benchmarks/x-index-colon-and-1.py rename to benchmarks/x_index_colon_and_1.py diff --git a/benchmarks/x-index-minus-1.py b/benchmarks/x_index_minus_1.py similarity index 100% rename from benchmarks/x-index-minus-1.py rename to benchmarks/x_index_minus_1.py diff --git a/benchmarks/x_minus_24.py b/benchmarks/x_minus_24.py index e2b41ec93..df397d4c1 100644 --- a/benchmarks/x_minus_24.py +++ b/benchmarks/x_minus_24.py @@ -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 diff --git a/benchmarks/x_plus_42.py b/benchmarks/x_plus_42.py index 880796950..6320fbd51 100644 --- a/benchmarks/x_plus_42.py +++ b/benchmarks/x_plus_42.py @@ -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 diff --git a/benchmarks/x_plus_42_10b.py b/benchmarks/x_plus_42_10b.py index 17173f7a3..ad2b80320 100644 --- a/benchmarks/x_plus_42_10b.py +++ b/benchmarks/x_plus_42_10b.py @@ -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 diff --git a/benchmarks/x_plus_42_11b.py b/benchmarks/x_plus_42_11b.py index 2b37cf182..bcb1000d6 100644 --- a/benchmarks/x_plus_42_11b.py +++ b/benchmarks/x_plus_42_11b.py @@ -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 diff --git a/benchmarks/x_plus_42_12b.py b/benchmarks/x_plus_42_12b.py index 840c8b1bc..4d3cb2465 100644 --- a/benchmarks/x_plus_42_12b.py +++ b/benchmarks/x_plus_42_12b.py @@ -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 diff --git a/benchmarks/x_plus_42_13b.py b/benchmarks/x_plus_42_13b.py index 23ba9f2f8..ff75f5796 100644 --- a/benchmarks/x_plus_42_13b.py +++ b/benchmarks/x_plus_42_13b.py @@ -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 diff --git a/benchmarks/x_plus_42_14b.py b/benchmarks/x_plus_42_14b.py index b3aa9ed0d..a53ab9ca6 100644 --- a/benchmarks/x_plus_42_14b.py +++ b/benchmarks/x_plus_42_14b.py @@ -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 diff --git a/benchmarks/x_plus_42_15b.py b/benchmarks/x_plus_42_15b.py index 49001df50..8407073c7 100644 --- a/benchmarks/x_plus_42_15b.py +++ b/benchmarks/x_plus_42_15b.py @@ -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 diff --git a/benchmarks/x_plus_42_16b.py b/benchmarks/x_plus_42_16b.py index fbfa5799a..723b18713 100644 --- a/benchmarks/x_plus_42_16b.py +++ b/benchmarks/x_plus_42_16b.py @@ -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 diff --git a/benchmarks/x_plus_42_32b.py b/benchmarks/x_plus_42_32b.py index a526e3d30..b0e28f31a 100644 --- a/benchmarks/x_plus_42_32b.py +++ b/benchmarks/x_plus_42_32b.py @@ -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 diff --git a/benchmarks/x_plus_42_8b.py b/benchmarks/x_plus_42_8b.py index f46f1930a..93481687c 100644 --- a/benchmarks/x_plus_42_8b.py +++ b/benchmarks/x_plus_42_8b.py @@ -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 diff --git a/benchmarks/x_plus_42_9b.py b/benchmarks/x_plus_42_9b.py index d71a1b602..c99a03b73 100644 --- a/benchmarks/x_plus_42_9b.py +++ b/benchmarks/x_plus_42_9b.py @@ -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 diff --git a/benchmarks/x_plus_42_tensor.py b/benchmarks/x_plus_42_tensor.py index cdef398fc..b77d18bcb 100644 --- a/benchmarks/x_plus_42_tensor.py +++ b/benchmarks/x_plus_42_tensor.py @@ -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])) diff --git a/benchmarks/x-reversed.py b/benchmarks/x_reversed.py similarity index 100% rename from benchmarks/x-reversed.py rename to benchmarks/x_reversed.py diff --git a/benchmarks/x_times_7.py b/benchmarks/x_times_7.py index ecad203e0..0e8cb7283 100644 --- a/benchmarks/x_times_7.py +++ b/benchmarks/x_times_7.py @@ -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 diff --git a/benchmarks/x_to_the_power_of_2.py b/benchmarks/x_to_the_power_of_2.py index e66b3bc43..596ff2e7a 100644 --- a/benchmarks/x_to_the_power_of_2.py +++ b/benchmarks/x_to_the_power_of_2.py @@ -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