tvm_tirx::ir::op_def

Module sig

Source
Expand description

Signature descriptors, for OpDef::signature (C++ sig::arg<T> and friends): the arguments an operator takes, with their documentation and the types a generated validator checks.

arg and ty_arg are the fixed value and type arguments, in order, var_args and var_ty_args a variadic tail of each, and call_attrs the type of Call.attrs. As an argument type, a node type, such as StringImm or Var, accepts an instance of it, as C++ TypeTraits<T>::CheckAnyStrict does, and Expr or Type accepts any. The typed views PrimExpr and IntExpr also check the expression’s type; PrimVar and TensorVar check a variable’s type, as the C++ view types of those names do. Implement ArgType for another check.

Re-exports§

Structs§

Traits§

  • What a signature checks an argument against (C++ TypeTraits<T>).
  • What OpDef::signature takes: a descriptor, or a tuple of them in order; () declares no argument.

Functions§

  • A required value argument of type T (C++ sig::arg<T>); Expr accepts any.
  • Call.attrs holds a T, which is also the operator’s attrs type (C++ sig::call_attrs<T>).
  • A required type argument of type T (C++ sig::ty_arg<T>); Type accepts any.
  • Zero or more further value arguments of type T (C++ sig::var_args<T>).
  • Whether value is a Var, not a subclass, whose type is an N.
  • Zero or more further type arguments of type T (C++ sig::var_ty_args<T>).