This commit introduces an MLIR interpreter framework. This interpreter framework allows multiple dialects register their op implementations. The interpreter traverses the SSACFG regions, manages the mapping between SSA names and evaluated values, and calls the op implementations with the evaluated values of the operands.
Details
- Reviewers
- None
Diff Detail
Event Timeline
| mlir/include/mlir/Interpreter/InterpreterOpInterface.h | ||
|---|---|---|
| 38 | Should it also provide an option to specify required alignment? | |
| 53 | https://en.cppreference.com/w/cpp/types/byte instead of char? | |
| mlir/include/mlir/Interpreter/InterpreterOpInterface.h | ||
|---|---|---|
| 38 | Or should it even do manual memory management? Can it be a wrapper around std::any? You’ll get type checks, and automatic object destruction, and correct handling of alignment, plus a small value optimization for avoiding heap allocations. | |
| mlir/include/mlir/Interpreter/InterpreterOpInterface.h | ||
|---|---|---|
| 58 | I think it should become something like ::tfrt::Value (https://github.com/tensorflow/runtime/blob/master/include/tfrt/host_context/value.h), because right now the assumption is that whoever creates EvalValueImpl owns the storage behind the pointer, and it's hard to find such place inside the interpret interface implementation. It can't go to heap either, because there is no way to tell when it should be destructed. | |
Should it also provide an option to specify required alignment?