Skip to content
Commit f772dcbb authored by Lei Zhang's avatar Lei Zhang
Browse files

[mlir][spirv] Support sub-byte integer types in type conversion

Typically GPUs cannot access memory in sub-byte manner. So for
sub-byte integer type values, we need to either expand them to
full bytes or tightly pack them. This commit adds support for
tightly packed power-of-two sub-byte types.

Sub-byte types aren't allowed in SPIR-V spec, so there are no
compute/storage capability for them like other supported integer
types. So we don't recognize sub-byte types in `spirv::ScalarType`.
We just special case them in type converter and always convert
to use i32 under the hood.

Reviewed By: kuhar

Differential Revision: https://reviews.llvm.org/D150395
parent a30e6f1b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment