You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2019/12/18 16:37:28 UTC

[GitHub] [incubator-tvm] mbarrett97 opened a new issue #4542: [AutoTVM] Tuning fails for an NHWC network on Arm CPU

mbarrett97 opened a new issue #4542: [AutoTVM] Tuning fails for an NHWC network on Arm CPU
URL: https://github.com/apache/incubator-tvm/issues/4542
 
 
   I'm trying to tune NHWC networks produced by the tflite frontend, but they fail with the error `AssertionError: only support NCHW/HWCN currently`. This suggests to me the AlterOpLayout pass is not happening during task extraction. I can force the AlterOpLayout pass to happen using the following patch:
   
   ```
   --- a/python/tvm/autotvm/task/relay_integration.py
   +++ b/python/tvm/autotvm/task/relay_integration.py
   @@ -49,7 +49,9 @@ def _lower(func,
                    grc = graph_runtime_codegen.GraphRuntimeCodegen(None, target)
                    return grc.codegen(mod["main"])
        # default case
   -    mod, _ = relay.optimize(func, target, params)
   +    with relay.build_config(opt_level=3):
   +        mod, _ = relay.optimize(func, target, params)
   +
        grc = graph_runtime_codegen.GraphRuntimeCodegen(None, target)
        return grc.codegen(mod["main"])
   ```
   
   which does fix this issue. Am I doing something wrong in AutoTVM or is this patch necessary?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] FrozenGene commented on issue #4542: [AutoTVM] Tuning fails for an NHWC network on Arm CPU

Posted by GitBox <gi...@apache.org>.
FrozenGene commented on issue #4542: [AutoTVM] Tuning fails for an NHWC network on Arm CPU
URL: https://github.com/apache/incubator-tvm/issues/4542#issuecomment-569045477
 
 
   Please keep an eye of PR #3859 , which could solve TFLite NHWC auto tune on ARM CPU problem.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] anijain2305 edited a comment on issue #4542: [AutoTVM] Tuning fails for an NHWC network on Arm CPU

Posted by GitBox <gi...@apache.org>.
anijain2305 edited a comment on issue #4542: [AutoTVM] Tuning fails for an NHWC network on Arm CPU
URL: https://github.com/apache/incubator-tvm/issues/4542#issuecomment-569121299
 
 
   I agree that AlterOpLayout and AutoTVM do not have the most intuitive design/user experience yet.
   
   For now, you can choose either of the 3 options
   1) Use the #3859 to use NHWC schedule. However, it might not give you the best performance because for now NCHW perf is somewhat better than NHWC.
   2) Call AlterOpLayout pass the way you did before extracting tasks.
   3) In general, use the #4335 ConvertLayout to convert the whole graph to NCHW and then call AutoTVM extraction. Similarly, after AutoTVM is done, before calling the relay.build, call ConvertLayout.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] anijain2305 commented on issue #4542: [AutoTVM] Tuning fails for an NHWC network on Arm CPU

Posted by GitBox <gi...@apache.org>.
anijain2305 commented on issue #4542: [AutoTVM] Tuning fails for an NHWC network on Arm CPU
URL: https://github.com/apache/incubator-tvm/issues/4542#issuecomment-569121299
 
 
   I agree that AlterOpLayout and AutoTVM do not have the most intuitive design/user experience yet.
   
   For now, you can choose either of the 3 options
   1) Use the #3859 to use NHWC schedule. However, it might not give you the best performance because for now NCHW perf is somewhat better than NHWC.
   2) Call AlterOpLayout pass the way you did before extracting layouts.
   3) In general, use the #4335 ConvertLayout to convert the whole graph to NCHW and then call AutoTVM extraction. Similarly, after AutoTVM is done, before calling the relay.build, call ConvertLayout.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] tqchen commented on issue #4542: [AutoTVM] Tuning fails for an NHWC network on Arm CPU

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #4542:
URL: https://github.com/apache/incubator-tvm/issues/4542#issuecomment-626412499


   close for now due to inactive status, and there are related  #3859 feel free to open new thread on the discuss forum


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org