Float constant. Parameters ---------- dtype : str The data type value : float The constant value. span : Optional[Span] The location of this expression in the source code.
| 579 | |
| 580 | @tvm_ffi.register_object("ir.FloatImm") |
| 581 | class FloatImm(ConstExpr): |
| 582 | """Float constant. |
| 583 | |
| 584 | Parameters |
| 585 | ---------- |
| 586 | dtype : str |
| 587 | The data type |
| 588 | |
| 589 | value : float |
| 590 | The constant value. |
| 591 | |
| 592 | span : Optional[Span] |
| 593 | The location of this expression in the source code. |
| 594 | """ |
| 595 | |
| 596 | value: float |
| 597 | |
| 598 | def __init__(self, dtype: str, value: float, span: Span | None = None) -> None: |
| 599 | self.__init_handle_by_constructor__( |
| 600 | tvm.ir._ffi_api.FloatImm, |
| 601 | dtype, |
| 602 | value, |
| 603 | span, # type: ignore |
| 604 | ) |
| 605 | |
| 606 | def __float__(self) -> float: |
| 607 | return self.value |
| 608 | |
| 609 | |
| 610 | @tvm_ffi.register_object("ir.IntImm") |
no outgoing calls
searching dependent graphs…