From bfac58cd8d67e78208d34888f6045773363ed58a Mon Sep 17 00:00:00 2001
From: Yaman Umuroglu <maltanar@gmail.com>
Date: Fri, 21 Aug 2020 16:36:41 +0200
Subject: [PATCH] [Core] fix typo in Alveo remote exec

---
 src/finn/core/remote_exec.py     | 4 ++--
 src/finn/core/throughput_test.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/finn/core/remote_exec.py b/src/finn/core/remote_exec.py
index 69e603dcf..ee0720131 100644
--- a/src/finn/core/remote_exec.py
+++ b/src/finn/core/remote_exec.py
@@ -85,7 +85,7 @@ def remote_exec(model, execution_context):
 
     # use platform attribute for correct remote execution
     if platform == "alveo":
-        remote_cmd = "bash -ic 'bash alveo_run.sh execute %d'" % batchsize
+        remote_cmd = "bash -ic 'bash alveo_run.sh execute %d' \"" % batchsize
     else:
         remote_cmd = (
             "python3.6 driver.py --exec_mode=execute --batchsize={} "
@@ -93,7 +93,7 @@ def remote_exec(model, execution_context):
             '--platform={} "'
         ).format(batchsize, bitfile, platform)
     cmd = (
-        local_prefix + "ssh {}@{} -p {} " '"cd {}/{}; ' + remote_prefix + remote_cmd
+        local_prefix + 'ssh {}@{} -p {} "cd {}/{}; ' + remote_prefix + remote_cmd
     ).format(pynq_username, pynq_ip, pynq_port, pynq_target_dir, deployment_folder)
     bash_command = ["/bin/bash", "-c", cmd]
     process_exec_accel = subprocess.Popen(bash_command, stdout=subprocess.PIPE)
diff --git a/src/finn/core/throughput_test.py b/src/finn/core/throughput_test.py
index df746cff4..77c7b6c00 100644
--- a/src/finn/core/throughput_test.py
+++ b/src/finn/core/throughput_test.py
@@ -70,7 +70,7 @@ def throughput_test_remote(model, batchsize=1000):
 
     # use platform attribute for correct remote execution
     if platform == "alveo":
-        remote_cmd = "bash -ic 'bash alveo_run.sh throughput_test %d'" % batchsize
+        remote_cmd = "bash -ic 'bash alveo_run.sh throughput_test %d' \"" % batchsize
     else:
         remote_cmd = (
             "python3.6 driver.py --exec_mode=throughput_test --batchsize={} "
@@ -78,7 +78,7 @@ def throughput_test_remote(model, batchsize=1000):
             '--platform={} "'
         ).format(batchsize, bitfile, platform)
     cmd = (
-        local_prefix + "ssh {}@{} -p {} " '"cd {}/{}; ' + remote_prefix + remote_cmd
+        local_prefix + 'ssh {}@{} -p {} "cd {}/{}; ' + remote_prefix + remote_cmd
     ).format(pynq_username, pynq_ip, pynq_port, pynq_target_dir, deployment_folder)
     bash_command = ["/bin/bash", "-c", cmd]
     process_throughput_test = subprocess.Popen(bash_command, stdout=subprocess.PIPE)
-- 
GitLab