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

[Test] add initial rtlsim perf test in end2end cnv-w1a1

parent 97f93c85
No related branches found
No related tags found
No related merge requests found
......@@ -72,6 +72,7 @@ from finn.util.test import get_test_model_trained, load_test_checkpoint_or_skip
from finn.transformation.fpgadataflow.annotate_resources import AnnotateResources
from finn.transformation.fpgadataflow.prepare_rtlsim import PrepareRTLSim
from finn.transformation.fpgadataflow.insert_fifo import InsertFIFO
from finn.core.throughput_test import throughput_test_rtlsim
build_dir = "/tmp/" + os.environ["FINN_INST_NAME"]
test_pynq_board = os.getenv("PYNQ_BOARD", default="Pynq-Z1")
......@@ -221,6 +222,20 @@ def test_end2end_cnv_w1a1_verify_dataflow_part():
assert np.isclose(res_cppsim, res_rtlsim_whole).all()
@pytest.mark.vivado
def test_end2end_cnv_w1a1_throughput_test_rtlsim():
model = load_test_checkpoint_or_skip(
build_dir + "/end2end_cnv_w1a1_ipstitch_whole_rtlsim.onnx"
)
model.set_metadata_prop("rtlsim_trace", "rtlsim_trace.vcd")
# os.environ["RTLSIM_TRACE_DEPTH"] = "4"
# run through IP-stitched rtlsim with increasing batch sizes and
# check the number of cycles it takes to execute
ret = throughput_test_rtlsim(model, 10)
# TODO check for expected performance
assert ret > 0
@pytest.mark.vivado
def test_end2end_cnv_w1a1_verify_all():
# use the streamlined model as the "golden" model for right answers
......
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