Skip to content

Commit

Permalink
Merge pull request Xilinx#979 from Xilinx/bugfix/pynq_driver_alveo
Browse files Browse the repository at this point in the history
Bugfix/pynq driver alveo
  • Loading branch information
auphelia authored Feb 13, 2024
2 parents ab1395d + 1ee77b7 commit d672bab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions docker/jenkins/test_bnn_hw_pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ def pytest_generate_tests(metafunc):

if len(scenarios) > 0:
for scenario in scenarios:
# There is a known Pynq/XRT issue with larger sets of weights on Alveo.
# Accesses to address spaces over 16KB do NOT work as intended.
# Disabling Alveo lfc HW test until resolved.
if scenario[0] == "U250_bnn_w1_a1_lfc_batchSize-1_platform-alveo":
continue
idlist.append(scenario[0])
items = scenario[1].items()
argnames = [x[0] for x in items]
Expand Down
8 changes: 5 additions & 3 deletions src/finn/qnn-data/templates/driver/driver_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,11 @@ def load_runtime_weights(self, flush_accel=True, verify=True):
# from a tinynumpy.ndarray to numpy.ndarray. To work around this, we first
# convert the tinynumpy.ndarray to a list and then copy the list to a
# numpy.ndarray.
new_w = np.copy(
list(layer_mmio.array[: layer_w.shape[0]]), dtype=layer_w.dtype
)
# There is a known bug with larger sets of weights. Accesses to address
# spaces over 16KB do NOT work as intended. Be aware of this if seeing
# unexpected behaviour.
new_array = layer_mmio.array[: layer_w.shape[0]]
new_w = np.copy(np.array(([x for x in new_array]), dtype=layer_w.dtype))
else:
new_w = np.copy(layer_mmio.array[: layer_w.shape[0]])
assert (layer_w == new_w).all()
Expand Down

0 comments on commit d672bab

Please sign in to comment.