Skip to main content

Module sig

Module sig 

Source
Expand description

Signature descriptors for OpDef::signature.

arg and ty_arg are fixed value and type arguments, var_args and var_ty_args variadic tails, and call_attrs the type of Call.attrs. A node type accepts an instance of it, and the typed expressions such as PrimExpr and PrimVar also check its type; implement ArgType for another check.

Re-exports§

pub use crate::ir::expr::IntExpr;
pub use crate::ir::expr::PrimExpr;
pub use crate::ir::expr::PrimVar;

Structs§

Arg
A descriptor of a required value argument of type T, made by arg.
CallAttrs
A descriptor of Call.attrs of type T, made by call_attrs.
TyArg
A descriptor of a required type argument of type T, made by ty_arg.
VarArgs
A descriptor of a variadic value tail of type T, made by var_args.
VarTyArgs
A descriptor of a variadic type-argument tail of type T, made by var_ty_args.

Traits§

ArgType
A check of an argument against a type.
Specs
The descriptors that OpDef::signature takes: a descriptor, or a tuple of them in order.

Functions§

arg
Describe a required value argument name of type T, documented by doc; Expr accepts any.
call_attrs
Describe the attributes of a Call: Call.attrs holds a T, which is also the operator’s attrs type; a signature has at most one.
ty_arg
Describe a required type argument name of type T, documented by doc; Type accepts any.
var_args
Describe zero or more further value arguments name of type T, documented by doc; a signature has at most one variadic value tail.
var_of_type
Return whether value is a Var, not a subclass, whose type is an N, such as TensorTypeObj: the check of variable argument types such as TensorVar.
var_ty_args
Describe zero or more further type arguments name of type T, documented by doc; a signature has at most one variadic type-argument tail.