[Mlir-commits] [mlir] [mlir][spirv] Add 8-bit float type emulation (PR #148811)
Jakub Kuderski
llvmlistbot at llvm.org
Mon Jul 21 09:29:35 PDT 2025
================
@@ -182,6 +183,15 @@ getTypeNumBytes(const SPIRVConversionOptions &options, Type type) {
return bitWidth / 8;
}
+ // Handle 8-bit floats.
+ if (options.emulateUnsupportedFloatTypes && isa<FloatType>(type)) {
+ auto bitWidth = type.getIntOrFloatBitWidth();
+ if (bitWidth == 8)
+ return bitWidth / 8;
+ else
+ return std::nullopt;
----------------
kuhar wrote:
No else after return: https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return
https://github.com/llvm/llvm-project/pull/148811
More information about the Mlir-commits
mailing list