iree-org / iree-llvm-sandbox

A sandbox for quick iteration and experimentation on projects related to IREE, MLIR, and LLVM
Apache License 2.0
54 stars 31 forks source link

[Substrait] Implement simple extensions. #853

Closed ingomueller-net closed 3 months ago

ingomueller-net commented 3 months ago

This is a mechanism of Substrait to define functions and types external to the core specification. This PR models the declarations as Symbols and references to them as symbol references in MLIR, which allows to use MLIR tooling around symbols (such as SymbolTables, iterating over symbol uses, code navigation via the LSP server, etc.). The PR does not yet implement a mechanism to use the functions and types, which subsequent PRs for ScalarFunction and similar are going to do.

While touching the PlanOp-related test cases, this op also merges the tests of that op, which were previously split into a "simple" and a "version" file, which probably predates the possibility to tell mlir-translate (and custom variants) to use output splitters.