[Mlir-commits] [mlir] [mlir] Support emit fp16 and bf16 type to cpp (PR #105803)

Jianjian Guan llvmlistbot at llvm.org
Sun Aug 25 23:40:22 PDT 2024


================
@@ -1640,6 +1640,11 @@ LogicalResult CppEmitter::emitType(Location loc, Type type) {
   }
   if (auto fType = dyn_cast<FloatType>(type)) {
     switch (fType.getWidth()) {
+    case 16:
+      if (llvm::isa<Float16Type>(type))
+        return (os << "_Float16"), success();
+      else
----------------
jacquesguan wrote:

Done

https://github.com/llvm/llvm-project/pull/105803


More information about the Mlir-commits mailing list