[Mlir-commits] [mlir] [mlir][bytecode] Implements back deployment capability for MLIR dialects (PR #70724)
Matteo Franciolini
llvmlistbot at llvm.org
Mon Oct 30 21:53:33 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:
I mostly left the string map to be consistent to the reader API (the string there makes sense since you need to trigger loading the dialect in the context). The only case I can think of that would require having a string map involves callbacks - for example, what if you want to apply a version to a dialect that does not exist in memory but you still want to back deploy to?
Although possible, I don't think it will be a common case though - mostly you will query the version within BytecodeDialectInterface, which means you probably have the dialect loaded in the context already. I am not sure if my previous argument warrant keeping it as a string map.
https://github.com/llvm/llvm-project/pull/70724
More information about the Mlir-commits
mailing list