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

[Fix] Fix conv2d alter op for arm cpu #5532

Merged
merged 1 commit into from
May 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions topi/python/topi/arm_cpu/conv2d_alter_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ def _alter_conv2d_layout(attrs, inputs, tinfos, out_type):
weight_expr = relay.transpose(weight_expr, axes=[0, 1, 2, 4, 3])

new_attrs['tile_size'] = tile_size
new_attrs['channels'] = CO

new_data = data
new_kernel = te.placeholder((KH + tile_size - 1,
Expand All @@ -139,6 +140,7 @@ def _alter_conv2d_layout(attrs, inputs, tinfos, out_type):
assert data_layout == "NCHW" and kernel_layout == "OIHW"
N, CI, H, W = get_const_tuple(data.shape)
CO, _, KH, KW = get_const_tuple(kernel.shape)
new_attrs['channels'] = CO
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to add a test case to cover this?


# pre-compute winograd_nnpack transform
# for winograd_nnpack_fp16, the the precompute prune pass must run on device,
Expand Down