diff --git a/src/finn/core/remote_exec.py b/src/finn/core/remote_exec.py index 69e603dcfd1a4535676c6e6eb072a91b2e8e15c2..ee07201315db23a9a1f8d0b7f1392d99517a8b63 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 df746cff4bbe7bf550679d1dc592bbb3f567512e..77c7b6c00179343048c52494fbffacd4c7447d7f 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)