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

[Test] remove extw end2end test from bnn-pynq, will do differently

parent 28b05a85
No related branches found
No related tags found
No related merge requests found
...@@ -591,45 +591,6 @@ class TestEnd2End: ...@@ -591,45 +591,6 @@ class TestEnd2End:
update_dashboard_data(topology, wbits, abits, "board", cfg["board"]) update_dashboard_data(topology, wbits, abits, "board", cfg["board"])
model.save(get_checkpoint_name(topology, wbits, abits, "build_" + kind)) model.save(get_checkpoint_name(topology, wbits, abits, "build_" + kind))
@pytest.mark.slow
@pytest.mark.vivado
@pytest.mark.vitis
@pytest.mark.parametrize("kind", ["zynq", "alveo"])
def test_build_extweights(self, topology, wbits, abits, kind):
if "VITIS_PATH" not in os.environ:
pytest.skip("VITIS_PATH not set")
prev_chkpt_name = get_checkpoint_name(
topology, wbits, abits, "fifodepth_" + kind
)
model = load_test_checkpoint_or_skip(prev_chkpt_name)
# select some FC layers, erase their implementation
# and set them to external weights
num_extw_layers = 0
for node in model.graph.node:
if node.op_type == "StreamingFCLayer_Batch":
node_inst = getCustomOp(node)
simd = node_inst.get_nodeattr("SIMD")
pe = node_inst.get_nodeattr("PE")
# skip layers which require very large IODMA DWCs
if (512 % simd) != 0 or ((pe * simd) % 32) != 0:
continue
node_inst.set_nodeattr("code_gen_dir_ipgen", "")
node_inst.set_nodeattr("ipgen_path", "")
node_inst.set_nodeattr("mem_mode", "external")
num_extw_layers += 1
if num_extw_layers == 0:
pytest.skip("No layers suitable for external weights")
# build
cfg = get_build_env(kind, target_clk_ns)
model = model.transform(cfg["build_fxn"])
# check list of interfaces
# model = model.transform(AnnotateResources("synth"))
# synth_dct = eval(model.get_metadata_prop("res_total_top_synth"))
# for (k, v) in synth_dct.items():
# update_dashboard_data(topology, wbits, abits, k, v)
# update_dashboard_data(topology, wbits, abits, "board", cfg["board"])
model.save(get_checkpoint_name(topology, wbits, abits, "build_" + kind+"_extweights"))
@pytest.mark.parametrize("kind", ["zynq", "alveo"]) @pytest.mark.parametrize("kind", ["zynq", "alveo"])
def test_deploy(self, topology, wbits, abits, kind): def test_deploy(self, topology, wbits, abits, kind):
prev_chkpt_name = get_checkpoint_name(topology, wbits, abits, "build_" + kind) prev_chkpt_name = get_checkpoint_name(topology, wbits, abits, "build_" + kind)
......
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