-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Description
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?
Metadata
Metadata
Assignees
Labels
No labels