Skip to content
Snippets Groups Projects
Commit 9c66a287 authored by Yaman Umuroglu's avatar Yaman Umuroglu
Browse files

[RemoteExec] take PYNQ board cfg from envvars if specified

parent 9e51c151
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,10 @@ DOCKER_INST_NAME="finn_${DOCKER_UNAME}"
: ${JUPYTER_PORT=8888}
: ${NETRON_PORT=8081}
: ${PYNQ_BOARD="Pynq-Z1"}
: ${PYNQ_IP="192.168.3.1"}
: ${PYNQ_USERNAME="xilinx"}
: ${PYNQ_PASSWORD="xilinx"}
: ${PYNQ_TARGET_DIR="/home/xilinx/$DOCKER_INST_NAME"}
# Absolute path to this script, e.g. /home/user/bin/foo.sh
SCRIPT=$(readlink -f "$0")
......@@ -112,6 +116,10 @@ docker run -t --rm --name $DOCKER_INST_NAME -it \
-e FINN_ROOT="/workspace/finn" \
-e VIVADO_IP_CACHE="$VIVADO_IP_CACHE" \
-e PYNQ_BOARD=$PYNQ_BOARD \
-e PYNQ_IP=$PYNQ_IP \
-e PYNQ_USERNAME=$PYNQ_USERNAME \
-e PYNQ_PASSWORD=$PYNQ_PASSWORD \
-e PYNQ_TARGET_DIR=$PYNQ_TARGET_DIR \
-p $JUPYTER_PORT:$JUPYTER_PORT \
-p $NETRON_PORT:$NETRON_PORT \
$DOCKER_TAG bash -c "$DOCKER_CMD"
......@@ -275,10 +275,10 @@ def test_fpgadataflow_ipstitch_pynq_deployment_folder():
model = ModelWrapper(
ip_stitch_model_dir + "/test_fpgadataflow_ipstitch_pynq_driver.onnx"
)
ip = "172.21.165.113"
username = "xilinx"
password = "xilinx"
target_dir = "/home/xilinx/" + os.environ["FINN_INST_NAME"]
ip = os.getenv("PYNQ_IP", "192.168.3.1")
username = os.getenv("PYNQ_USERNAME", "xilinx")
password = os.getenv("PYNQ_PASSWORD", "xilinx")
target_dir = os.getenv("PYNQ_TARGET_DIR", "/home/xilinx/finn")
model = model.transform(DeployToPYNQ(ip, username, password, target_dir))
pynq_ip = model.get_metadata_prop("pynq_ip")
pynq_username = model.get_metadata_prop("pynq_username")
......@@ -306,3 +306,4 @@ def test_fpgadataflow_ipstitch_remote_execution():
x = gen_finn_dt_tensor(idt, (1, 4))
input_dict = {"inp": x}
outp = execute_onnx(model, input_dict)
print(outp)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment