Skip to content

[BUG] Schedule that doesn't support dynamic height/width is selected when compiling convolution for arm_cpu #16536

@lhutton1

Description

@lhutton1

Expected behaviour:

When an arm_cpu target is used, the model should compile successfully without an error.

Actual behaviour:

When compiled on an arm_cpu target, the models results in the following error:

python/tvm/autotvm/task/topi_integration.py:165: in wrapper
node = topi_compute(cfg, *args)
python/tvm/topi/arm_cpu/conv2d.py:50: in conv2d_nchw_spatial_pack
return conv2d_spatial_pack_nchw(

def conv2d_spatial_pack_nchw(cfg, data, kernel, strides, padding, dilation, out_dtype, num_tile):
    """compute define for Conv2d Spatial Pack with NCHW layout"""
    out_dtype = out_dtype or data.dtype
    N, CI, IH, IW = get_const_tuple(data.shape)
    if isinstance(N, tvm.tir.Any):
        N = tvm.te.size_var("n")
    if not isinstance(IH, int) or not isinstance(IW, int):
>           raise RuntimeError("ARM winograd conv2d doesn't support dynamic input height or width.")
E           RuntimeError: ARM winograd conv2d doesn't support dynamic input height or width.

Environment:

Tested with TVM at 6a3fadc. The issue was found as a result of the changes in #16513, however it can be reproduced without as described below.

How to reproduce:

Run the following tests:

  • pytest tests/python/relay/test_any.py -k test_any_conv2d

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


Likely schedule selection in relay/strategy/arm_cpu.py needs to be fixed not to select a schedule that doesn't support dynamic height/width.

Metadata

Metadata

Assignees

No one assigned

    Labels

    flow:relayThe overall lowering flow for tvm.relay.build, including BYOC core, excluding tvm.driver.build.needs-triagePRs or issues that need to be investigated by maintainers to find the right assignees to address itstatus:stalePR is stale and not being acted on for a whiletopipython/tvm/topitype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions