From 4849f2cf4c66854f18b14c66b76b0abf3d2d4ed1 Mon Sep 17 00:00:00 2001 From: wrongtest Date: Thu, 2 Feb 2023 18:10:05 +0800 Subject: [PATCH] fix doc for tvm.te.const() --- python/tvm/te/operation.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/python/tvm/te/operation.py b/python/tvm/te/operation.py index ae3ad7ca892a..59bc76f5041e 100644 --- a/python/tvm/te/operation.py +++ b/python/tvm/te/operation.py @@ -467,13 +467,13 @@ def var(name="tindex", dtype="int32", span=None): return tvm.tir.Var(name, dtype, span) -def const(dtype="int32", span=None): - """Create a new constant with specified name and dtype +def const(value, dtype="int32", span=None): + """Create a new constant with specified value and dtype Parameters ---------- - name : str - The name + value : Union[bool, int, float, numpy.ndarray, tvm.nd.NDArray] + The constant value. dtype : str The data type @@ -483,10 +483,10 @@ def const(dtype="int32", span=None): Returns ------- - var : Var - The result symbolic variable. + const : PrimExpr + The result constant expr. """ - return tvm.tir.const(dtype, span) + return tvm.tir.const(value, dtype, span) def size_var(name="size", dtype="int32", span=None):