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

Better grouped convolution for CPU targets #6137

Merged
merged 28 commits into from
Mar 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d572a55
integrated with v0.8
Wheest Dec 21, 2020
f32132b
Rebase, and undoing accidental removal of auto scheduler NHWC support
Wheest Jul 26, 2020
ca5c67f
Added ASF license header
Wheest Aug 27, 2020
737d36f
Minor bug fixes
Wheest Aug 27, 2020
e22adbe
Added asymmetric padding support
Wheest Aug 28, 2020
d7f6c2b
Improve linting
Wheest Aug 28, 2020
323f8e5
Better linting, disable final linting checks
Wheest Aug 31, 2020
55ad3d7
Fixed final linting errors (figured out how to run lint tests locally)
Wheest Sep 3, 2020
0722844
fixing linter formatting part 1
Wheest Dec 21, 2020
c9460ef
fixing linter formatting part 2
Wheest Dec 21, 2020
b41a868
fixing linter formatting part 3
Wheest Dec 21, 2020
1adf616
Update conv2d.py
Wheest Dec 21, 2020
0a26e5c
Rebase, and update responding to some comments
Wheest Jan 6, 2021
c79a7ca
Fixed AutoScheduler bug for NHWC case
Wheest Mar 18, 2021
bd32372
removed infer_pad from GSPC
Wheest Mar 19, 2021
a3f9e51
Rebase, and undoing accidental removal of auto scheduler NHWC support
Wheest Jul 26, 2020
e741ca7
Added ASF license header
Wheest Aug 27, 2020
36f9128
Minor bug fixes
Wheest Aug 27, 2020
12de6b8
Added asymmetric padding support
Wheest Aug 28, 2020
ef858b4
Improve linting
Wheest Aug 28, 2020
10d6e40
Better linting, disable final linting checks
Wheest Aug 31, 2020
f468988
Fixed final linting errors (figured out how to run lint tests locally)
Wheest Sep 3, 2020
6fef83a
Update conv2d.py
Wheest Dec 21, 2020
cf87146
Rebase, and update responding to some comments
Wheest Jan 6, 2021
8f74750
Fixed AutoScheduler bug for NHWC case
Wheest Mar 18, 2021
53b4d5b
Minor fix
Wheest Mar 23, 2021
fd23e11
Fixed removal of infer_pad to no padding
Wheest Mar 23, 2021
7a2c3ca
Fixed unexpected linting error
Wheest Mar 23, 2021
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
7 changes: 3 additions & 4 deletions python/tvm/relay/op/strategy/arm_cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,10 @@ def conv2d_strategy_arm_cpu(attrs, inputs, out_type, target):
else: # group_conv2d
if layout == "NCHW":
assert kernel_layout == "OIHW"
logger.warning("group_conv2d with layout NCHW is not optimized for arm cpu.")
strategy.add_implementation(
wrap_compute_conv2d(topi.nn.group_conv2d_nchw, has_groups=True),
wrap_topi_schedule(topi.generic.schedule_group_conv2d_nchw),
name="group_conv2d_nchw.generic",
wrap_compute_conv2d(topi.arm_cpu.group_conv2d_nchw, has_groups=True),
wrap_topi_schedule(topi.arm_cpu.schedule_group_conv2d_nchw),
name="group_conv2d_nchw.arm_cpu",
)
elif layout == "NHWC":
assert kernel_layout == "HWIO"
Expand Down
8 changes: 3 additions & 5 deletions python/tvm/relay/op/strategy/x86.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,10 @@ def conv2d_strategy_cpu(attrs, inputs, out_type, target):
else: # group_conv2d
if layout == "NCHW":
assert kernel_layout == "OIHW"
if not is_auto_scheduler_enabled():
logger.warning("group_conv2d is not optimized for x86 with autotvm.")
strategy.add_implementation(
wrap_compute_conv2d(topi.nn.group_conv2d_nchw, has_groups=True),
wrap_topi_schedule(topi.generic.schedule_group_conv2d_nchw),
name="group_conv2d_nchw.generic",
wrap_compute_conv2d(topi.x86.group_conv2d_nchw, has_groups=True),
wrap_topi_schedule(topi.x86.schedule_group_conv2d_nchw),
name="group_conv2d_nchw.x86",
)
elif layout == "NHWC":
assert kernel_layout == "HWIO"
Expand Down
1 change: 1 addition & 0 deletions python/tvm/topi/arm_cpu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@
from .bitserial_dense import *
from .injective import *
from . import cortex_m7
from .group_conv2d import *
Loading