From daaa7902dff080bfa5e307c3a6628e8a8d356d6e Mon Sep 17 00:00:00 2001 From: leowang1225 <810916296@qq.com> Date: Wed, 30 Dec 2020 16:30:59 +0800 Subject: [PATCH] [Auto Scheduler][fix] Add dense strategy for mali Signed-off-by: leowang1225 <810916296@qq.com> --- python/tvm/relay/op/strategy/mali.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/python/tvm/relay/op/strategy/mali.py b/python/tvm/relay/op/strategy/mali.py index c4cb4a135e8e..fc47bd65a8f7 100644 --- a/python/tvm/relay/op/strategy/mali.py +++ b/python/tvm/relay/op/strategy/mali.py @@ -171,9 +171,16 @@ def conv2d_winograd_without_weight_transfrom_strategy_mali(attrs, inputs, out_ty def dense_strategy_mali(attrs, inputs, out_type, target): """dense mali strategy""" strategy = _op.OpStrategy() - strategy.add_implementation( - wrap_compute_dense(topi.mali.dense), - wrap_topi_schedule(topi.mali.schedule_dense), - name="dense.mali", - ) + if not is_auto_scheduler_enabled(): + strategy.add_implementation( + wrap_compute_dense(topi.mali.dense), + wrap_topi_schedule(topi.mali.schedule_dense), + name="dense.mali", + ) + else: + strategy.add_implementation( + wrap_compute_dense(topi.nn.dense, need_auto_scheduler_layout=True), + naive_schedule, + name="dense.mali", + ) return strategy