[Mlir-commits] [mlir] [mlir][spirv] Enable dot operation for bfloat16 (PR #145409)

Darren Wihandi llvmlistbot at llvm.org
Fri Jul 4 21:29:22 PDT 2025


================
@@ -21,6 +21,44 @@ using namespace mlir::spirv::AttrNames;
 
 namespace mlir::spirv {
 
+//===----------------------------------------------------------------------===//
+// Dot Product ops
+//===----------------------------------------------------------------------===//
+
+static std::optional<spirv::Version> getDotProductMinVersion() {
+  return spirv::Version::V_1_0; // Available in SPIR-V >= 1.0.
+}
+
+static std::optional<spirv::Version> getDotProductMaxVersion() {
+  return spirv::Version::V_1_6; // Available in SPIR-V <= 1.6.
+}
----------------
fairywreath wrote:

I do not like hardcoding the maximum version here - is there currently a way to retrieve the "default" maximum spirv version? From my understanding the only place this is defined is inside the availability field inside the tablegen definition for `SPIRV_Op`, and there is no way to retrieve that here.

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


More information about the Mlir-commits mailing list