Skip to content
Commit 311af4ab authored by Lei Zhang's avatar Lei Zhang Committed by jpienaar
Browse files

Const fold splat vectors/tensors in standard add, sub, and mul ops

The const folding logic is structurally similar, so use a template
to abstract the common part.

Moved mul(x, 0) to a legalization pattern to be consistent with
mul(x, 1).

Also promoted getZeroAttr() to be a method on Builder since it is
expected to be frequently used.

PiperOrigin-RevId: 228891989
parent 78da6704
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment