From 173a542babc22fe0e1e6bdd74ff50680f21b63dc Mon Sep 17 00:00:00 2001 From: Qingchao Shen Date: Thu, 12 Feb 2026 12:53:10 +0800 Subject: [PATCH] Handle non-tuple/list input in utils.py avoid hang! --- python/tvm/topi/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/tvm/topi/utils.py b/python/tvm/topi/utils.py index e24c499a0e98..c9ba1d23dbaf 100644 --- a/python/tvm/topi/utils.py +++ b/python/tvm/topi/utils.py @@ -185,6 +185,8 @@ def get_const_tuple(in_tuple): out_tuple : tuple of int The output. """ + if not isinstance(in_tuple, (tuple, list)): + return (in_tuple,) ret = [] ana = None for elem in in_tuple: