tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[BUG] NCHW4c is an unsupported convolution layout for `arm_cpu`

Open lhutton1 opened this issue 1 year ago • 0 comments

Expected behaviour:

When compiled with target arm_cpu the model should compile successfully.

Actual behaviour:

The test fails to run and gives the following error:

def conv2d_strategy_arm_cpu(attrs, inputs, out_type, target):
...
    else:
>               raise RuntimeError(f"Unsupported conv2d layout {layout} for arm cpu")
E               RuntimeError: Unsupported conv2d layout NCHW4c for arm cpu

python/tvm/relay/op/strategy/arm_cpu.py:273: RuntimeError

Environment:

Tested with TVM at https://github.com/apache/tvm/commit/6a3fadc0654ecf9557ffe08d24677684c96e80b0. The issue was found as a result of the changes in https://github.com/apache/tvm/pull/16513, however it can be reproduced without as described below.

How to reproduce:

pytest tests/python/relay/test_pass_alter_op_layout.py -k test_alter_layout_nonscalar_broadcast
pytest tests/python/relay/test_pass_alter_op_layout.py -k test_alter_layout_blocked_no_broadcast
pytest tests/python/relay/test_pass_alter_op_layout.py -k test_alter_layout_blocked_broadcast
pytest tests/python/relay/test_pass_alter_op_layout.py -k test_alter_layout_re_blocking_broadcast
pytest tests/python/relay/test_pass_alter_op_layout.py -k test_broadcast_non_adaptable
pytest tests/python/relay/test_pass_alter_op_layout.py -k test_broadcast_respect_input_layouts

Run any of the above tests with an arm_cpu target. Note: Reminder to remove any skip condition that exists in the test currently.

lhutton1 avatar Feb 07 '24 10:02 lhutton1