From f92926a8022bdbc177ac1991f0c8ce9d84afbaf4 Mon Sep 17 00:00:00 2001
From: Yaman Umuroglu <maltanar@gmail.com>
Date: Thu, 20 Aug 2020 17:54:55 +0200
Subject: [PATCH] [Alveo] working remote_exec on Alveo

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

diff --git a/src/finn/core/remote_exec.py b/src/finn/core/remote_exec.py
index 0574e9b3c..69e603dcf 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 -i 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={} "
diff --git a/src/finn/core/throughput_test.py b/src/finn/core/throughput_test.py
index 4f349dcab..df746cff4 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 -i 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={} "
-- 
GitLab