Skip to main content

Module shim

Module shim 

Source
Expand description

What a chip allows: the one interface every chip answers through.

The shared optimizer decides a fusion once, for every chip, by dataflow alone; a chip’s shim says whether it runs the fused op whole. The answer is data the chip declares, consulted before a rule commits, so a chip never receives a fused op it cannot run:

• native — the chip has a primitive that computes the fused op whole; • decompose — the chip runs the fused op as its parts, each of which it allows; • refuse — the chip runs neither, and says why.

Structs§

Linking
A chip as if it linked classes whole, whatever their shape, and answered everything else as it does: where a rule building those classes would fire on the chip once its link has them.
ReferenceShim
The shim that allows everything: the meaning alone, for graph-level tests. It answers no class by name — every class is one it links whole, whatever the registry adds.

Enums§

Allow
A chip’s answer for one op.
Position
Where a chip’s own rule runs in the table: before a shared rule, after one, or after them all.
Support
What a chip’s link does with a class wherever it meets one.

Traits§

Shim
What a chip allows.

Functions§

allows
Whether the chip runs op: a fused op of a class it links whole that its link builds as it stands (Native), one of a class it runs as its parts, every part allowed (Decompose), or neither, by name — a refused part names the part and its own reason. A lifted op, a view or a quantize is judged by its shape alone.