Skip to content
Commit c1844220 authored by Lei Zhang's avatar Lei Zhang Committed by A. Unique TensorFlower
Browse files

(De)serialize bool and integer scalar spv.constant

SPIR-V has multiple constant instructions covering different
constant types:

* `OpConstantTrue` and `OpConstantFalse` for boolean constants
* `OpConstant` for scalar constants
* `OpConstantComposite` for composite constants
* `OpConstantNull` for null constants
* ...

We model them all with a single spv.constant op for uniformity
and friendliness to transformations. This does mean that when
doing (de)serialization, we need to poke spv.constant's type
to determine which SPIR-V binary instruction to use.

This CL only covers the case of bool and integer spv.constant.
The rest will follow.

PiperOrigin-RevId: 259311698
parent 9d52ceaf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment