mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
chore: fix inputsets in benchmark
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(6), shape=(3,))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 6, size=(3,)),) for _ in range(32)]
|
||||
inputset = [np.random.randint(0, 2 ** 6, size=(3,)) for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -13,7 +13,7 @@ def main():
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(4, 5))
|
||||
c = np.arange(20).reshape((4, 5))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(4, 5)),) for _ in range(128)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(4, 5)) for _ in range(128)]
|
||||
|
||||
inputs = []
|
||||
labels = []
|
||||
|
||||
@@ -14,7 +14,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(2), shape=(2, 3))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 2, size=(2, 3)),) for _ in range(128)]
|
||||
inputset = [np.random.randint(0, 2 ** 2, size=(2, 3)) for _ in range(128)]
|
||||
|
||||
inputs = []
|
||||
labels = []
|
||||
|
||||
@@ -168,9 +168,7 @@ def main():
|
||||
def function_to_compile(x_0):
|
||||
return table[(x_0 + zp_x) * w_0]
|
||||
|
||||
inputset = []
|
||||
for x_i in x_q:
|
||||
inputset.append((int(x_i[0]),))
|
||||
inputset = [int(x_i[0]) for x_i in x_q]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -240,9 +240,7 @@ def main():
|
||||
def function_to_compile(x_0, x_1):
|
||||
return table[((x_0 + zp_x) * w_0) + ((x_1 + zp_x) * w_1)]
|
||||
|
||||
inputset = []
|
||||
for x_i in x_q:
|
||||
inputset.append((int(x_i[0]), int(x_i[1])))
|
||||
inputset = [(int(x_i[0]), int(x_i[1])) for x_i in x_q]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(3, 2))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(3, 2)),) for _ in range(32)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(3, 2)) for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(3,))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(3,)),) for _ in range(32)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(3,)) for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(3,))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(3,)),) for _ in range(32)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(3,)) for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(3,))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(3,)),) for _ in range(32)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(3,)) for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(3, 2))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(3, 2)),) for _ in range(32)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(3, 2)) for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(3,))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(3,)),) for _ in range(32)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(3,)) for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(3,))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(3,)),) for _ in range(32)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(3,)) for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(3,))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(3,)),) for _ in range(32)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(3,)) for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(3,))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(3,)),) for _ in range(32)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(3,)) for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -13,7 +13,7 @@ def main():
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(4, 5))
|
||||
c = np.arange(20).reshape((4, 5))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(4, 5)),) for _ in range(128)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(4, 5)) for _ in range(128)]
|
||||
|
||||
inputs = []
|
||||
labels = []
|
||||
|
||||
@@ -14,7 +14,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(2), shape=(2, 3))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 2, size=(2, 3)),) for _ in range(128)]
|
||||
inputset = [np.random.randint(0, 2 ** 2, size=(2, 3)) for _ in range(128)]
|
||||
|
||||
inputs = []
|
||||
labels = []
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(3,))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 2, size=(3,)) + np.array([1, 2, 3]),) for _ in range(32)]
|
||||
inputset = [np.random.randint(0, 2 ** 2, size=(3,)) + np.array([1, 2, 3]) for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -12,9 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(2, 3))
|
||||
|
||||
inputset = [
|
||||
(np.random.randint(0, 2 ** 2, size=(2, 3)) + np.array([1, 2, 3]),) for _ in range(32)
|
||||
]
|
||||
inputset = [np.random.randint(0, 2 ** 2, size=(2, 3)) + np.array([1, 2, 3]) for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(6), shape=(3,))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 5, size=(3,)) + 24,) for _ in range(32)]
|
||||
inputset = [np.random.randint(0, 2 ** 5, size=(3,)) + 24 for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -13,7 +13,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(10, 6))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(10, 6)),) for _ in range(128)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(10, 6)) for _ in range(128)]
|
||||
|
||||
inputs = []
|
||||
labels = []
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(3,))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(3,)),) for _ in range(32)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(3,)) for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(2, 3))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(2, 3)),) for _ in range(32)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(2, 3)) for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(3,))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(3,)),) for _ in range(32)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(3,)) for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(10, 6))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(10, 6)),) for _ in range(128)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(10, 6)) for _ in range(128)]
|
||||
|
||||
inputs = []
|
||||
labels = []
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(3,))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(3,)),) for _ in range(32)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(3,)) for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(2, 3))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(2, 3)),) for _ in range(32)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(2, 3)) for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(3,))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(3,)),) for _ in range(32)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(3,)) for _ in range(32)]
|
||||
|
||||
# bench: Measure: Compilation Time (ms)
|
||||
engine = hnp.compile_numpy_function(
|
||||
|
||||
@@ -12,7 +12,7 @@ def main():
|
||||
|
||||
x = hnp.EncryptedTensor(hnp.UnsignedInteger(3), shape=(2, 4))
|
||||
|
||||
inputset = [(np.random.randint(0, 2 ** 3, size=(2, 4)),) for _ in range(128)]
|
||||
inputset = [np.random.randint(0, 2 ** 3, size=(2, 4)) for _ in range(128)]
|
||||
|
||||
inputs = []
|
||||
labels = []
|
||||
|
||||
Reference in New Issue
Block a user