Skip to content

Commit

Permalink
Merge pull request #1157 from lstasytis/update/onnx
Browse files Browse the repository at this point in the history
[Deps] Update qonnx commit hash
  • Loading branch information
auphelia authored Aug 13, 2024
2 parents 2580269 + f71f4ba commit 793656b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion fetch-repos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

QONNX_COMMIT="fd61cfeebbdaba351abf7e9d54cd785d7776fa4f"
QONNX_COMMIT="2281a777d84aa5cbd7469085c2e534fb4a03ccf9"
FINN_EXP_COMMIT="0724be21111a21f0d81a072fccc1c446e053f851"
BREVITAS_COMMIT="84f42259ec869eb151af4cb8a8b23ad925f493db"
PYVERILATOR_COMMIT="ce0a08c20cb8c1d1e84181d6f392390f846adbd1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import warnings
from onnx import TensorProto, helper
from qonnx.transformation.base import Transformation
from qonnx.transformation.lower_convs_to_matmul import _auto_pad_to_explicit_padding
from qonnx.util.basic import get_by_name
from qonnx.util.basic import auto_pad_to_explicit_padding, get_by_name


class InferPixelPaddingDeconv(Transformation):
Expand Down Expand Up @@ -61,7 +60,7 @@ def apply(self, model):
# use specified padding
pad = get_by_name(n.attribute, "pads").ints
else:
pad = _auto_pad_to_explicit_padding(
pad = auto_pad_to_explicit_padding(
auto_pad,
ifm_dim_h,
ifm_dim_w,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@
from qonnx.transformation.general import GiveReadableTensorNames, GiveUniqueNodeNames
from qonnx.transformation.infer_datatypes import InferDataTypes
from qonnx.transformation.infer_shapes import InferShapes
from qonnx.transformation.lower_convs_to_matmul import (
LowerConvsToMatMul,
_auto_pad_to_explicit_padding,
from qonnx.transformation.lower_convs_to_matmul import LowerConvsToMatMul
from qonnx.util.basic import (
auto_pad_to_explicit_padding,
gen_finn_dt_tensor,
get_by_name,
qonnx_make_model,
)
from qonnx.util.basic import gen_finn_dt_tensor, get_by_name, qonnx_make_model

import finn.core.onnx_exec as oxe
import finn.transformation.fpgadataflow.convert_to_hw_layers as to_hw
Expand All @@ -69,11 +71,11 @@ def create_conv_model(idim_h, idim_w, ifm, k, stride, ofm, idt, wdt, pad_mode, d
group = ifm if depthwise else 1
group_str = str(group)
ishp = (1, ifm, idim_h, idim_w)
pad_0 = _auto_pad_to_explicit_padding(pad_mode, idim_h, idim_w, k, k, stride, stride, 2)
pad_0 = auto_pad_to_explicit_padding(pad_mode, idim_h, idim_w, k, k, stride, stride, 2)
int_dim_h = compute_conv_output_dim(idim_h, k, stride, total_pad=pad_0[0] + pad_0[2])
int_dim_w = compute_conv_output_dim(idim_w, k, stride, total_pad=pad_0[1] + pad_0[3])

pad_1 = _auto_pad_to_explicit_padding(pad_mode, int_dim_h, int_dim_w, k, k, stride, stride, 2)
pad_1 = auto_pad_to_explicit_padding(pad_mode, int_dim_h, int_dim_w, k, k, stride, stride, 2)
odim_h = compute_conv_output_dim(int_dim_h, k, stride, total_pad=pad_1[0] + pad_1[2])
odim_w = compute_conv_output_dim(int_dim_w, k, stride, total_pad=pad_1[1] + pad_1[3])
oshp = (1, ifm, odim_h, odim_w) if depthwise else (1, ofm, odim_h, odim_w)
Expand Down

0 comments on commit 793656b

Please sign in to comment.