Skip to content

[AutoTVM] Mali autotuning fails for ResNet #3980

@mbaret

Description

@mbaret

Autotuning on Mali fails for ResNet18_v1 (from gluon) with error:

TVMError: Not all Vars are passed in api_args:  'threadIdx.x'  does not appear in api_args
Error during compile function
-----------------------------
v0.0.4
fn (%p0: Tensor[(1, 512, 7, 7), float32], %p1: Tensor[(1, 512, 7, 7), float32], %p2: Tensor[(512, 512, 3, 3), float32], %p3: Tensor[(512, 1, 1), float32], %p4: Tensor[(512, 1, 1), float32], Primitive=1) -> Tensor[(1, 512, 7, 7), float32] {
  %0 = nn.conv2d(%p1, %p2, padding=[1, 1], channels=512, kernel_size=[3, 3]) /* ty=Tensor[(1, 512, 7, 7), float32] */;
  %1 = multiply(%0, %p3) /* ty=Tensor[(1, 512, 7, 7), float32] */;
  %2 = add(%1, %p4) /* ty=Tensor[(1, 512, 7, 7), float32] */;
  %3 = add(%p0, %2) /* ty=Tensor[(1, 512, 7, 7), float32] */;
  nn.relu(%3) /* ty=Tensor[(1, 512, 7, 7), float32] */
}

3809 and 4072 appear to describe the same issue.

I've been able to resolve this by forcibly disabling the use of tophub fallback configs during task discovery under tvm/python/tvm/autotvm/task/relay_integration.py

This doesn't seem like an elegant solution, but is there any reason why tophub needs to be used during this step? Disabling tophub here would also make it easier to add new targets which aren't yet represented in tophub.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions