From abf46c132a02f3c2d7da7a8ca367a643d8165c80 Mon Sep 17 00:00:00 2001
From: Yaman Umuroglu <maltanar@gmail.com>
Date: Sun, 24 May 2020 23:30:17 +0100
Subject: [PATCH] [Core] enable specifying batch size as option in
 throughput_test

---
 src/finn/core/throughput_test.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/finn/core/throughput_test.py b/src/finn/core/throughput_test.py
index c82d540e2..39e71efa8 100644
--- a/src/finn/core/throughput_test.py
+++ b/src/finn/core/throughput_test.py
@@ -30,7 +30,7 @@ import os
 import subprocess
 
 
-def throughput_test(model):
+def throughput_test(model, batchsize=1000):
     """Runs the throughput test for the given model remotely on the pynq board.
     The metadata properties related to the pynq board have to be set.
     Returns a dictionary with results of the throughput test"""
@@ -47,7 +47,8 @@ def throughput_test(model):
     cmd = (
         "sshpass -p {} ssh {}@{} -p {} "
         '"cd {}/{}; echo "{}" | '
-        'sudo -S python3.6 driver.py --exec_mode="throughput_test" --batchsize=1000"'
+        'sudo -S python3.6 driver.py --exec_mode="throughput_test" --batchsize=%d"'
+        % batchsize
     ).format(
         pynq_password,
         pynq_username,
-- 
GitLab