Skip to content

Commit

Permalink
[Doc] fix doc for tvm.te.const() (apache#13904)
Browse files Browse the repository at this point in the history
fix doc for tvm.te.const()
  • Loading branch information
wrongtest-intellif authored Feb 3, 2023
1 parent a89ff3e commit 666006e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions python/tvm/te/operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand Down

0 comments on commit 666006e

Please sign in to comment.