[all-commits] [llvm/llvm-project] f772dc: [mlir][spirv] Support sub-byte integer types in ty...
Lei Zhang via All-commits
all-commits at lists.llvm.org
Thu May 11 15:18:13 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f772dcbb5104bc83548e2454909f0a870dfadde5
https://github.com/llvm/llvm-project/commit/f772dcbb5104bc83548e2454909f0a870dfadde5
Author: Lei Zhang <antiagainst at google.com>
Date: 2023-05-11 (Thu, 11 May 2023)
Changed paths:
M mlir/include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h
M mlir/lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp
M mlir/test/Conversion/FuncToSPIRV/types-to-spirv.mlir
M mlir/test/Conversion/MemRefToSPIRV/memref-to-spirv.mlir
Log Message:
-----------
[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
More information about the All-commits
mailing list