HomePhabricator

[mlir][Python][Linalg] Adding const, capture, and index support to the OpDSL.

Authored by gysit on Apr 28 2021, 11:45 PM.

Description

[mlir][Python][Linalg] Adding const, capture, and index support to the OpDSL.

The patch extends the OpDSL with support for:

  • Constant values
  • Capture scalar parameters
  • Access the iteration indices using the index operation
  • Provide predefined floating point and integer types.

Up to now the patch only supports emitting the new nodes. The C++/yaml path is not fully implemented. The fill_rng_2d operation defined in emit_structured_generic.py makes use of the new DSL constructs.

Differential Revision: https://reviews.llvm.org/D101364