Skip to content

Commit

Permalink
Merge pull request #1171 from Xilinx/update/brevitas
Browse files Browse the repository at this point in the history
Update Brevitas version for FINN
  • Loading branch information
auphelia authored Sep 12, 2024
2 parents 972378a + f6b1e2b commit 37837df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fetch-repos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

QONNX_COMMIT="2281a777d84aa5cbd7469085c2e534fb4a03ccf9"
FINN_EXP_COMMIT="0724be21111a21f0d81a072fccc1c446e053f851"
BREVITAS_COMMIT="84f42259ec869eb151af4cb8a8b23ad925f493db"
BREVITAS_COMMIT="d4834bd2a0fad3c1fbc0ff7e1346d5dcb3797ea4"
PYVERILATOR_COMMIT="ce0a08c20cb8c1d1e84181d6f392390f846adbd1"
CNPY_COMMIT="4e8810b1a8637695171ed346ce68f6984e585ef4"
HLSLIB_COMMIT="16e5847a5e3ef76cffe84c8fad2f010d593457d3"
Expand Down
3 changes: 2 additions & 1 deletion tests/brevitas/test_brevitas_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import os
import torch
from brevitas.export import export_qonnx
from brevitas.quant_tensor import _unpack_quant_tensor
from pkgutil import get_data
from qonnx.core.modelwrapper import ModelWrapper
from qonnx.util.cleanup import cleanup as qonnx_cleanup
Expand Down Expand Up @@ -90,7 +91,7 @@ def test_brevitas_debug(QONNX_FINN_conversion):
else:
assert len(names_common) == 8
for dbg_name in names_common:
tensor_pytorch = dbg_hook.values[dbg_name].value.detach().numpy()
tensor_pytorch = _unpack_quant_tensor(dbg_hook.values[dbg_name]).detach().numpy()
tensor_finn = output_dict[dbg_name]
assert np.isclose(tensor_finn, tensor_pytorch, atol=1e-5).all()
os.remove(finn_onnx)

0 comments on commit 37837df

Please sign in to comment.