[Mlir-commits] [mlir] [mlir][bytecode] Implements back deployment capability for MLIR dialects (PR #70724)

Jeff Niu llvmlistbot at llvm.org
Tue Oct 31 12:43:16 PDT 2023


================
@@ -400,6 +400,10 @@ class DialectBytecodeWriter {
 
   /// Return the bytecode version being emitted for.
   virtual int64_t getBytecodeVersion() const = 0;
+
+  /// Retrieve the dialect version by name if available.
+  virtual FailureOr<const DialectVersion *>
+  getDialectVersion(StringRef dialectName) const = 0;
----------------
Mogball wrote:

Can't you write

```
template <typename DialectT>
FailureOr<const DialectVersion *>
getDialectVersion() const { return getDialectVersion(DialectT::getDialectNamespace()); }
```

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


More information about the Mlir-commits mailing list