From 929bccd41caeace443f63caa0f29482ef2b9fbb0 Mon Sep 17 00:00:00 2001 From: Jian Sheng Date: Fri, 24 Feb 2023 21:39:02 +0000 Subject: [PATCH] fix pytorch frontend full_impl --- python/tvm/relay/frontend/pytorch.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/tvm/relay/frontend/pytorch.py b/python/tvm/relay/frontend/pytorch.py index 635cb960a829..4db1b3a27cc4 100644 --- a/python/tvm/relay/frontend/pytorch.py +++ b/python/tvm/relay/frontend/pytorch.py @@ -738,6 +738,8 @@ def full_impl(self, data, fill_value, dtype): size = _op.concatenate(tmp, axis=0) if not isinstance(fill_value, _expr.Constant): + if isinstance(fill_value, _expr.Expr): + fill_value = _infer_value(fill_value, {}) fill_value = _expr.const(fill_value, dtype=dtype) out = _op.full(fill_value, size, dtype=dtype) if need_reshape: