You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by tq...@apache.org on 2021/06/05 14:14:11 UTC

[tvm] branch main updated: fix bug in dense_nopack if dynamic input shape (#8166)

This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 43387d0  fix bug in dense_nopack if dynamic input shape (#8166)
43387d0 is described below

commit 43387d0c313f66abd00d5bbe8b1d4296a9421d9a
Author: Tianqi Zhang (张天启) <ly...@gmail.com>
AuthorDate: Sat Jun 5 22:13:56 2021 +0800

    fix bug in dense_nopack if dynamic input shape (#8166)
---
 python/tvm/topi/x86/dense.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/python/tvm/topi/x86/dense.py b/python/tvm/topi/x86/dense.py
index 6011f01..4fed4c1 100644
--- a/python/tvm/topi/x86/dense.py
+++ b/python/tvm/topi/x86/dense.py
@@ -155,6 +155,7 @@ def _default_dense_nopack_config(cfg, M, N, K):
     cfg["tile_k"] = SplitEntity([K // tilek_bn, tilek_bn])
     cfg["tile_x"] = SplitEntity([N, 1])
     cfg["tile_y"] = SplitEntity([1, M])
+    return M, N, K
 
 
 @autotvm.register_topi_compute("dense_nopack.x86")
@@ -175,7 +176,7 @@ def dense_nopack(cfg, data, weight, bias=None, out_dtype=None):
         "tile_k", 32 if isinstance(K, (tvm.tir.Var, tvm.tir.Any)) else K, num_outputs=2
     )
     if cfg.is_fallback:
-        _default_dense_nopack_config(cfg, M, N, K)
+        M, N, K = _default_dense_nopack_config(cfg, M, N, K)
 
     vec = cfg["tile_k"].size[-1]
     k = te.reduce_axis((0, K // vec), "k")