Skip to content

Commit 666006e

Browse files
[Doc] fix doc for tvm.te.const() (#13904)
fix doc for tvm.te.const()
1 parent a89ff3e commit 666006e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

python/tvm/te/operation.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -467,13 +467,13 @@ def var(name="tindex", dtype="int32", span=None):
467467
return tvm.tir.Var(name, dtype, span)
468468

469469

470-
def const(dtype="int32", span=None):
471-
"""Create a new constant with specified name and dtype
470+
def const(value, dtype="int32", span=None):
471+
"""Create a new constant with specified value and dtype
472472
473473
Parameters
474474
----------
475-
name : str
476-
The name
475+
value : Union[bool, int, float, numpy.ndarray, tvm.nd.NDArray]
476+
The constant value.
477477
478478
dtype : str
479479
The data type
@@ -483,10 +483,10 @@ def const(dtype="int32", span=None):
483483
484484
Returns
485485
-------
486-
var : Var
487-
The result symbolic variable.
486+
const : PrimExpr
487+
The result constant expr.
488488
"""
489-
return tvm.tir.const(dtype, span)
489+
return tvm.tir.const(value, dtype, span)
490490

491491

492492
def size_var(name="size", dtype="int32", span=None):

0 commit comments

Comments
 (0)