MCPcopy
hub / github.com/apache/tvm / IntImm

Class IntImm

python/tvm/tirx/expr.py:611–652  ·  view source on GitHub ↗

Int constant. Parameters ---------- dtype : str The data type value : int The constant value. span : Optional[Span] The location of this expression in the source code.

Source from the content-addressed store, hash-verified

609
610@tvm_ffi.register_object("ir.IntImm")
611class IntImm(ConstExpr):
612 """Int constant.
613
614 Parameters
615 ----------
616 dtype : str
617 The data type
618
619 value : int
620 The constant value.
621
622 span : Optional[Span]
623 The location of this expression in the source code.
624 """
625
626 value: int
627
628 def __init__(self, dtype: str, value: int, span: Span | None = None) -> None:
629 self.__init_handle_by_constructor__(
630 tvm.ir._ffi_api.IntImm,
631 dtype,
632 value,
633 span, # type: ignore
634 )
635
636 def __hash__(self) -> int:
637 return self.value
638
639 def __int__(self) -> int:
640 return self.value
641
642 def __nonzero__(self) -> bool:
643 return self.value != 0
644
645 def __eq__(self, other: PrimExpr) -> PrimExpr:
646 return _ffi_api._OpEQ(self, other, None) # type: ignore
647
648 def __ne__(self, other: PrimExpr) -> PrimExpr:
649 return _ffi_api._OpNE(self, other, None) # type: ignore
650
651 def __bool__(self) -> bool:
652 return self.__nonzero__()
653
654
655@tvm_ffi.register_object("tirx.StringImm") # type: ignore

Callers 15

layout_transformFunction · 0.90
splitFunction · 0.90
transform_layoutMethod · 0.90
get_mma_fill_intrinFunction · 0.90
get_mma_fill_intrinFunction · 0.90
get_wmma_fill_intrinFunction · 0.90
get_mma_init_intrinFunction · 0.90
_andFunction · 0.90
_orFunction · 0.90
_auto_broadcastFunction · 0.90
whereFunction · 0.90
_as_rangeFunction · 0.90

Calls

no outgoing calls

Tested by 15

expected_inverseFunction · 0.72
test_split_int64_factorsFunction · 0.72
visit_var_Method · 0.72
visit_add_Method · 0.72
test_variable_replacerFunction · 0.72
test_simple_stmt_counterFunction · 0.72
test_empty_expressionsFunction · 0.72
test_stmt_mutatorFunction · 0.72
_build_expected_implFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…