MCPcopy Index your code
hub / github.com/apache/tvm / Constant

Class Constant

python/tvm/relax/expr.py:725–758  ·  view source on GitHub ↗

Constant Tensor Parameters ---------- data: tvm.runtime.Tensor The data of the constant tensor. struct_info: Optional[StructInfo] The struct info of the constant tensor. If not specified, infer it from data. span: Optional[Span] Span that points to orig

Source from the content-addressed store, hash-verified

723
724@tvm_ffi.register_object("relax.expr.Constant")
725class Constant(ExprWithOp):
726 """Constant Tensor
727
728 Parameters
729 ----------
730 data: tvm.runtime.Tensor
731 The data of the constant tensor.
732
733 struct_info: Optional[StructInfo]
734 The struct info of the constant tensor. If not specified, infer it from data.
735
736 span: Optional[Span]
737 Span that points to original source code
738
739 Note
740 ----
741 Scalar constants are represented by ndim-0 constant tensors.
742 """
743
744 data: tvm.runtime.Tensor
745 span: Span | None
746
747 def __init__(
748 self,
749 data: tvm.runtime.Tensor,
750 struct_info: StructInfo | None = None,
751 span: Span | None = None,
752 ) -> None:
753 self.__init_handle_by_constructor__(
754 _ffi_api.Constant,
755 data,
756 struct_info,
757 span, # type: ignore
758 )
759
760
761@tvm_ffi.register_object("relax.expr.Var")

Callers 2

constFunction · 0.90
constFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…