MCPcopy Create free account
hub / github.com/apache/tvm / const

Function const

python/tvm/te/operation.py:459–478  ·  view source on GitHub ↗

Create a new constant with specified value and dtype Parameters ---------- value : Union[bool, int, float, numpy.ndarray, tvm.runtime.Tensor] The constant value. dtype : str The data type span : Optional[Span] The location of this variable in the source

(value, dtype="int32", span=None)

Source from the content-addressed store, hash-verified

457
458
459def const(value, dtype="int32", span=None):
460 """Create a new constant with specified value and dtype
461
462 Parameters
463 ----------
464 value : Union[bool, int, float, numpy.ndarray, tvm.runtime.Tensor]
465 The constant value.
466
467 dtype : str
468 The data type
469
470 span : Optional[Span]
471 The location of this variable in the source.
472
473 Returns
474 -------
475 const : PrimExpr
476 The result constant expr.
477 """
478 return tvm.tirx.const(value, dtype, span)
479
480
481def size_var(name="size", dtype="int32", span=None):

Callers 1

__getitem__Method · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…