Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPSET and Assuming 4D input is NCHW #993

Open
1 task
Ba1tu3han opened this issue Feb 25, 2024 · 1 comment
Open
1 task

OPSET and Assuming 4D input is NCHW #993

Ba1tu3han opened this issue Feb 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Ba1tu3han
Copy link

Ba1tu3han commented Feb 25, 2024

Prerequisites

Please make sure to check off these prerequisites before submitting a bug report.

  • [+] Test that the bug appears on the current version of the dev-branch. Make sure to include the commit hash of the commit you checked out.
  • [+] Check that the issue hasn't already been reported, by checking the currently open issues.
  • If there are steps to reproduce the problem, make sure to write them down below.
  • [+] If relevant, please include the ONNX files, which were created directly before and/or after the bug.

Quick summary

I trained Brevitas CNV model on CIFAR10 dataset by using QAT and exported it by this scpript

from brevitas.export import export_qonnx
input_tensor = torch.randn(batch_size, n_channel, shape_x, shape_y).to(device)
export_qonnx(model, input_tensor, export_path='QONNX_CNV.onnx')

Then, imported it to tfc_end2end_example.ipynb

Unfortunately, I have encountered with warnings and errors:

image
image

Details

QONNX File
QONNX_CNV.zip

Brevitas

Brevitas: 0.10.2
Ubuntu: 20.04
Python: 3.10.12
Torch: 2.1.0
CUDA: 12.2

FINN

FINN: 0.10 (tag: dev_latest)
Docker: 25.0.1
Vivado: 2022.1
Vitis HLS: 2022.1
Ubuntu: 20.04
Python: 3.11.5

Error:

AssertionError: MultiThreshold_6: Signed output requres actval < 0

Possible fix

Using an extra convertion or a setting

@Ba1tu3han Ba1tu3han added the bug Something isn't working label Feb 25, 2024
@Ba1tu3han Ba1tu3han reopened this Aug 22, 2024
@Ba1tu3han
Copy link
Author

Ba1tu3han commented Aug 27, 2024

@auphelia could you help me about that?

I follow cnv_end2end_example notebook. I can implement W1A1 version that I trained CNV by Brevitas succesfully in Pynq-Z2. However I just change quantization from 1 bit to 2 bits, I have this issue. Where should I look?

I have checked similar github issues but I could not find a solution.

Bests,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant