Module tract_hir::infer::rules[][src]

Expand description

A fluent interface for the analyser.

This interface provides proxies for the different properties of tensors. This allows inference rules to be stated in a clear, declarative fashion inside the rules method of each operator.

Take these rules for instance:

solver.equals(inputs.len(), 2);
solver.equals(inputs[0].datum_type, outputs[0].datum_type);

Here, inputs.len, inputs[0].datum_type and outputs[0].datum_type don’t actually hold the values of the length and datum_types, but instead act as declarative placeholders for these values.

Modules

Structs

A proxy for a dimension of a shape.

A proxy for a tensor element.

A proxy for any integer-like value.

A proxy for a tensor shape.

A declarative constraint solver for tensors.

A proxy for a tensor.

A proxy for a tensor datum_type.

A proxy for the whole tensor value.

Traits

A proxy which can be used in a solver rule.

A proxy for any value.

Type Definitions