This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg][python] Adapt the OpDSL to use scalars.
ClosedPublic

Authored by gysit on Jun 14 2021, 5:52 AM.

Details

Summary

The patch replaces the existing capture functionality by scalar operands that have been introduced by https://reviews.llvm.org/D104109. Scalar operands behave as tensor operands except for the fact that they are not indexed. As a result ScalarDefs can be accessed directly as no indexing expression is needed.

The patch only updates the OpDSL. The C++ side is updated by a follow up patch.

Diff Detail

Event Timeline

gysit created this revision.Jun 14 2021, 5:52 AM
gysit requested review of this revision.Jun 14 2021, 5:53 AM
stellaraccident accepted this revision.Jun 14 2021, 9:44 PM

This is good - thanks. I'm glad we were able to back away from the more complicated capture semantics and just directly represent scalars.

mlir/python/mlir/dialects/linalg/opdsl/lang/comprehension.py
211

Type: "... an index determines their position [in] the operation's..."

This revision is now accepted and ready to land.Jun 14 2021, 9:44 PM
gysit updated this revision to Diff 352060.Jun 15 2021, 1:28 AM

Address comment.

gysit marked an inline comment as done.Jun 15 2021, 1:30 AM
This revision was automatically updated to reflect the committed changes.