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

Class Call

python/tvm/relax/expr.py:534–584  ·  view source on GitHub ↗

Function call node in Relax. Call node corresponds the operator application node in computational graph terminology. Parameters ---------- op: tvm.ir.Op or any tvm.relax.Expr with function type. The operation to be called. args: Union[List[Expr], typing.Tuple[Expr,

Source from the content-addressed store, hash-verified

532
533@tvm_ffi.register_object("relax.expr.Call")
534class Call(ExprWithOp):
535 """Function call node in Relax.
536
537 Call node corresponds the operator application node
538 in computational graph terminology.
539
540 Parameters
541 ----------
542 op: tvm.ir.Op or any tvm.relax.Expr with function type.
543 The operation to be called.
544
545 args: Union[List[Expr], typing.Tuple[Expr, ...]]
546 The arguments to the call.
547
548 attrs: Optional[tvm.ir.Attrs]
549 Attributes to the call, can be None
550
551 sinfo_args: Optional[Union[List[StructInfo], typing.Tuple[StructInfo, ...]]]
552 The structure info arguments of a CallNode.
553 sinfo_args is designed to be non-empty only for intrinsic op (e.g.,
554 call_tir, call_builtin_with_ctx, etc.) and calls to ExternFuncs, with the main
555 usage of structure info inference.
556
557 span: Optional[Span]
558 Span that points to original source code
559 """
560
561 op: Expr
562 args: list[Expr]
563 attrs: tvm.ir.Attrs
564 sinfo_args: list[StructInfo]
565 span: Span | None
566
567 def __init__(
568 self,
569 op: Expr | tvm.ir.Op,
570 args: list[Expr] | tuple[Expr, ...],
571 attrs: tvm.ir.Attrs | None = None,
572 sinfo_args: list[StructInfo] | tuple[StructInfo, ...] | None = None,
573 span: Span | None = None,
574 ):
575 if not sinfo_args:
576 sinfo_args = []
577 self.__init_handle_by_constructor__(
578 _ffi_api.Call,
579 op,
580 args,
581 attrs,
582 sinfo_args,
583 span, # type: ignore
584 )
585
586
587@tvm_ffi.register_object("relax.expr.If")

Callers 7

call_packedFunction · 0.90
emit_with_sinfoFunction · 0.90
__call__Method · 0.70
__call__Method · 0.70
_tensor_stride_iFunction · 0.50
_tensor_byte_offsetFunction · 0.50
_tensor_elem_offsetFunction · 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…