Skip to content

Adopt the linalg_transform dialect that was prototyped in iree-llvm-sandbox - #8581

Merged
nicolasvasilache merged 18 commits into
mainfrom
sandbox-integrate
Mar 21, 2022
Merged

nicolasvasilache merged 18 commits into
mainfrom
sandbox-integrate

Conversation

@nicolasvasilache

@nicolasvasilache nicolasvasilache commented Mar 18, 2022 •

Copy link
Copy Markdown
Contributor

This revision brings the LinalgTransform dialect that was prototyped in the IREE LLVM sandbox: lib, include.

This dialect is a better way to ship Linalg and Vector-based transformations that generate close to peak performing code (see arxiv publication).

This revision brings the code into IREE and adapts to IREE's build system.

@nicolasvasilache
nicolasvasilache force-pushed the sandbox-integrate branch 7 times, most recently from 4055c2c to 54ef9fb Compare March 21, 2022 14:46
@nicolasvasilache
nicolasvasilache enabled auto-merge (squash) March 21, 2022 15:26

@ScottTodd ScottTodd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This a lot of new code. Please add a detailed PR description to help with the review process.

@nicolasvasilache nicolasvasilache changed the title Sandbox integrate Adopt the linalg_transform dialect that was prototyped in iree-llvm-sandbox Mar 21, 2022
@MaheshRavishankar

Copy link
Copy Markdown
Collaborator

Sorry, didnt check the copy right, cause I only reviewed changes to iree/compiler assuming that everything moving into llvm-external-projects is pre-reviewed + blessed code.

In terms of whether we should have experimental code in IREE, AFAICS the code that is landing in llvm-external-project is not directly used in IREE. Yes it adds build and maintenance overhead w.r.t integration. In terms of functionality things from there are used in deliberate fashion, i.e. there is an option that turns these on for now for use in IREE. I expect that when they are out of "experimental" stage, they will move to LLVM and we use it from there. In that sense it is on par with other experimental things we have in iree/compiler/ that area also guarded by flags.

This PR itself doesnt touch iree/compiler. So again I treat this as blessed + pre-reviewed code. I am stamping cause I dont have a blocker, but of course other concerns need to be addressed.

@ScottTodd ScottTodd added compiler/dialects Relating to the IREE compiler dialects (flow, hal, vm) codegen Shared code generation infrastructure and dialects labels Mar 21, 2022
@nicolasvasilache

Copy link
Copy Markdown
Contributor Author

I changed the license manually, hopefully this won't trigger issues on the other end ..

@stellaraccident

Copy link
Copy Markdown
Collaborator

I changed the license manually, hopefully this won't trigger issues on the other end ..

We technically should have been using that header on iree-llvm-sandbox sources as well. Note that this does not change the license but is bringing the notice at the top of the source files into alignment with the form that our legal team expects of sources in a Google repo with this license.

@stellaraccident

Copy link
Copy Markdown
Collaborator

LGTM - I consider Mahesh's viewpoint on inclusion and use of this code to be the high order bit. The policy issues seem resolved to my satisfaction and comply with my understanding of our policies.

@nicolasvasilache
nicolasvasilache dismissed stale reviews from GMNGeoffrey and ScottTodd March 21, 2022 19:33

See Stella's comment

@nicolasvasilache
nicolasvasilache merged commit 11fb8d0 into main Mar 21, 2022
@nicolasvasilache
nicolasvasilache deleted the sandbox-integrate branch March 21, 2022 19:33
@nicolasvasilache

Copy link
Copy Markdown
Contributor Author

This revision adds the linalg_transform dialect which prototypes MLIR-based control of Linalg transformations (see overarching discourse thread https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927 and ODM: https://discourse.llvm.org/t/open-mlir-meeting-3-17-2022-interfaces-and-dialects-for-controlling-transformation/61003).

This form control is mature enough to replace C++ pipelines using the "Linalg codegen strategy": close-to-peak codegen results from our paper (https://arxiv.org/abs/2202.03293) have been ported to this transform dialect.

For more context and details on the incremental development of the transform dialect, see https://github.com/google/iree-llvm-sandbox/pulls?page=2&q=is%3Apr+is%3Aclosed+transform+dialect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codegen Shared code generation infrastructure and dialects compiler/dialects Relating to the IREE compiler dialects (flow, hal, vm)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants