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

[PYNQ] remove stale outputs in generated driver

parent ce9837d5
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,7 @@ cd %s
pynq_driver_template = """
import argparse
import os
from pynq import Overlay
import numpy as np
from pynq import allocate
......@@ -207,6 +207,9 @@ if __name__ == "__main__":
# for the remote execution the data from the input npy file has to be loaded,
# packed and copied to the PYNQ buffer
if exec_mode == "execute":
# remove old output file to prevent reusing old output
# in case execution fails
os.remove(outputfile)
# load desired input .npy file
ibuf_normal = np.load(inputfile)
ibuf_folded = finnDriver.fold_input(ibuf_normal)
......@@ -217,6 +220,8 @@ if __name__ == "__main__":
# for the throughput test the runtime of the network has to be measured
if exec_mode == "throughput_test":
# remove old metrics file
os.remove("nw_metrics.txt")
# measure runtime of network
start = time.time()
# dictionary for results of throughput test
......
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