Skip to content

Commit

Permalink
[End2end] Fix bnn end2end test
Browse files Browse the repository at this point in the history
  • Loading branch information
auphelia committed May 30, 2024
1 parent 0a2b436 commit 97f59d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/finn/transformation/fpgadataflow/annotate_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ def apply(self, model):
# recurse into model to manually annotate per-layer resources
sdp_model_filename = getCustomOp(node).get_nodeattr("model")
sdp_model = ModelWrapper(sdp_model_filename)
sdp_model = sdp_model.transform(AnnotateResources(self.mode, self.res_dict))
sdp_model = sdp_model.transform(
AnnotateResources(self.mode, self.fpgapart, self.res_dict)
)
sdp_dict = sdp_model.get_metadata_prop("res_total_" + self.mode)
sdp_dict = eval(sdp_dict)
# save transformed model
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/test_end2end_bnn_pynq.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ def test_ipgen(self, topology, wbits, abits, board):
build_data = get_build_env(board, target_clk_ns)
if build_data["kind"] == "alveo" and ("VITIS_PATH" not in os.environ):
pytest.skip("VITIS_PATH not set")
prev_chkpt_name = get_checkpoint_name(topology, wbits, abits, "fold")
prev_chkpt_name = get_checkpoint_name(topology, wbits, abits, "minimize_bit_width")
model = load_test_checkpoint_or_skip(prev_chkpt_name)
model = model.transform(GiveUniqueNodeNames())
model = model.transform(PrepareIP(build_data["part"], target_clk_ns))
Expand Down

0 comments on commit 97f59d5

Please sign in to comment.