HomePhabricator

Add lowering of constant ops to SPIR-V.

Authored by mravishankar on Oct 10 2019, 3:51 PM.

Description

Add lowering of constant ops to SPIR-V.

The lowering is specified as a pattern and is done only if the result
is a SPIR-V scalar type or vector type.
Handling ConstantOp with index return type needs special handling
since SPIR-V dialect does not have index types. Based on the bitwidth
of the attribute value, either i32 or i64 is chosen.
Other constant lowerings are left as a TODO.

PiperOrigin-RevId: 274056805

Details

Committed
jpienaarOct 10 2019, 5:19 PM
Parents
rG736f80d0ddd8: Add trait for specified shapes matching
Branches
Unknown
Tags
Unknown