Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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