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

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

expr

Structs

DimProxy

A proxy for a dimension of a shape.

ElementProxy

A proxy for a tensor element.

IntProxy

A proxy for any integer-like value.

ShapeProxy

A proxy for a tensor shape.

Solver

A declarative constraint solver for tensors.

TensorProxy

A proxy for a tensor.

TypeProxy

A proxy for a tensor datum_type.

ValueProxy

A proxy for the whole tensor value.

Traits

ComparableProxy

A proxy which can be used in a solver rule.

InferenceRulesOp
Proxy

A proxy for any value.

Type Definitions

InferenceResult