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

Matteo Franciolini llvmlistbot at llvm.org
Tue Oct 31 14:02:34 PDT 2023


================
@@ -97,6 +98,14 @@ class BytecodeWriterConfig {
   /// Get the set desired bytecode version to emit.
   int64_t getDesiredBytecodeVersion() const;
 
+  /// A map containing the dialect versions to emit.
+  llvm::StringMap<std::unique_ptr<DialectVersion>> &
+  getDialectVersionMap() const;
----------------
mfrancio wrote:

The map is referenced within the BytecodeDialectWriter, so this is mostly convenience - the alternative is to pass the writer configs to the BytecodeDialectWriter itself. Reading multiple versions is really needed for the callback-mechanism (where you could use version X to conditionally emit encodings for dialect Y). For the other cases you should not need to query registered versions other than `self`.

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


More information about the Mlir-commits mailing list