[Mlir-commits] [mlir] [mlir][spirv] Add bfloat16 support (PR #141458)

Jakub Kuderski llvmlistbot at llvm.org
Thu Jun 5 07:24:40 PDT 2025


================
@@ -619,7 +625,19 @@ void ScalarType::getCapabilities(
   } else {
     assert(llvm::isa<FloatType>(*this));
     switch (bitwidth) {
-      WIDTH_CASE(Float, 16);
+    case 16: {
+      if (llvm::isa<BFloat16Type>(*this)) {
+        static const Capability caps[] = {Capability::BFloat16TypeKHR};
+        ArrayRef<Capability> ref(caps, std::size(caps));
+        capabilities.push_back(ref);
----------------
kuhar wrote:

Also here

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


More information about the Mlir-commits mailing list