Skip to content

Commit

Permalink
fix bug in dense_nopack if dynamic input shape (#8166)
Browse files Browse the repository at this point in the history
  • Loading branch information
lygztq authored Jun 5, 2021
1 parent 5b37b4a commit 43387d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/tvm/topi/x86/dense.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand Down

0 comments on commit 43387d0

Please sign in to comment.