Closed heborras closed 3 years ago
This commit should probably also be merged into the itu_competition
branch, which is probably more important than the one it currently points at. In that branch the same issue exists.
@HenniOVP thanks for catching this bug and submitting the PR. I think the requirement to call discount_sparsity=False
is a bit disruptive (e.g. for the ITU competition), so until the Brevitas Quant
op export for bipolar cases is resolved let's opt for a custom execution path inside the quantize
function -- I'll push something for this and do the merge afterwards, both for the feature/qonnx_compute_cost
and the itu_competition
branches.
Hi, this PR adds support for 1 bit ops, as they are used by as example the TFC W1A1 network, here: TFC_1W1A.zip
However, an issue remains with this: Since the binary and bipolar representation are currently not properly implemented in the quant node, the
inference_cost
function will discount all weights as being sparse, though they are not. Thus on has to passdiscount_sparsity=False
to get the correct number of bitops.Previously, when running
inference_cost
on this network the calculation would fail with the following Exception for the TFC W1A1 network: