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

[Test] AbsorbSignBiasIntoMultiThreshold in BNN-PYNQ end2end

parent e2640358
No related branches found
No related tags found
No related merge requests found
...@@ -129,12 +129,7 @@ def update_dashboard_data(topology, wbits, abits, key, val): ...@@ -129,12 +129,7 @@ def update_dashboard_data(topology, wbits, abits, key, val):
def fold_tfc(model): def fold_tfc(model):
fc_layers = model.get_nodes_by_op_type("StreamingFCLayer_Batch") fc_layers = model.get_nodes_by_op_type("StreamingFCLayer_Batch")
# (PE, SIMD, ramstyle) for each layer # (PE, SIMD, ramstyle) for each layer
config = [ config = [(16, 49, "block"), (8, 8, "auto"), (8, 8, "auto"), (10, 8, "distributed")]
(16, 49, "block"),
(8, 8, "auto"),
(8, 8, "auto"),
(10, 8, "distributed"),
]
for fcl, (pe, simd, ramstyle) in zip(fc_layers, config): for fcl, (pe, simd, ramstyle) in zip(fc_layers, config):
fcl_inst = getCustomOp(fcl) fcl_inst = getCustomOp(fcl)
fcl_inst.set_nodeattr("PE", pe) fcl_inst.set_nodeattr("PE", pe)
...@@ -372,6 +367,7 @@ class TestEnd2End: ...@@ -372,6 +367,7 @@ class TestEnd2End:
def test_streamline(self, topology, wbits, abits): def test_streamline(self, topology, wbits, abits):
prev_chkpt_name = get_checkpoint_name(topology, wbits, abits, "pre_post") prev_chkpt_name = get_checkpoint_name(topology, wbits, abits, "pre_post")
model = load_test_checkpoint_or_skip(prev_chkpt_name) model = load_test_checkpoint_or_skip(prev_chkpt_name)
model = model.transform(absorb.AbsorbSignBiasIntoMultiThreshold())
# move past any reshapes to be able to streamline input scaling # move past any reshapes to be able to streamline input scaling
model = model.transform(MoveScalarLinearPastInvariants()) model = model.transform(MoveScalarLinearPastInvariants())
model = model.transform(Streamline()) model = model.transform(Streamline())
......
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