Skip to content

Commit

Permalink
[TOPI] Fix tuple unpack in conv2d NCHWc int8 (#13761)
Browse files Browse the repository at this point in the history
Fixes a tuple being incorrectly unpacked (too many elements expected) in a Conv2D TOPI int8 op, similarly to #13566 which addressed the issue specifically in the ARM implementation (which calls the function modified in this PR). 

This explicit unpacking helps improve flexibility with other incoming layouts.
  • Loading branch information
michalpiszczek authored Jan 17, 2023
1 parent 1acb907 commit 1258863
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/tvm/topi/nn/conv2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,9 @@ def conv2d_NCHWc_int8(

n, ic_chunk, ih, iw, ic_bn = get_const_tuple(data.shape)
in_channel = ic_chunk * ic_bn
oc_chunk, ic_chunk_group, kernel_height, kernel_width, _, oc_bn, _ = get_const_tuple(
kernel.shape
)
oc_chunk, ic_chunk_group, kernel_height, kernel_width, _, oc_bn = get_const_tuple(kernel.shape)[
:6
]
groups = ic_chunk // ic_chunk_group

dilated_kernel_h = (kernel_height - 1) * dilation_h + 1
Expand Down

0 comments on commit 1258863

Please sign in to comment.