Skip to content

Use dynamic pass pipelines while lowering on CPU backends. - #5934

Merged
MaheshRavishankar merged 2 commits into
iree-org:mainfrom
MaheshRavishankar:dynamic_pass_pipeline_select
May 20, 2021
Merged

MaheshRavishankar merged 2 commits into
iree-org:mainfrom
MaheshRavishankar:dynamic_pass_pipeline_select

Conversation

@MaheshRavishankar

Copy link
Copy Markdown
Collaborator

The lowering of linalg operations to scalar/vector code is modified to
use dynamic pass pipelines. A new pass LowerExecutableTargetPass is
added that lowers an executable to the scalar/vector code. This pass
sets the configuration to use when lowering the module within the
target operation. At the time of setting the configuration, the pass
to use is also decided. This is used to dynamically select the pass
pipeline to use for the lowering.

Currently only two pipelines exist. One for vectorization based
lowering and other to lower to scalar code directly. The existing
pipeline is reordered to make the distinction between lowering a
Linalg operation to scalar/native-vector operations and the pipeline
needed to convert those into LLVM Dialect. The latter must be
re-usable across all pipelines used for CPU lowering.

The lowering of linalg operations to scalar/vector code is modified to
use dynamic pass pipelines. A new pass `LowerExecutableTargetPass` is
added that lowers an executable to the scalar/vector code. This pass
sets the configuration to use when lowering the module within the
target operation. At the time of setting the configuration, the pass
to use is also decided. This is used to dynamically select the pass
pipeline to use for the lowering.

Currently only two pipelines exist. One for vectorization based
lowering and other to lower to scalar code directly. The existing
pipeline is reordered to make the distinction between lowering a
Linalg operation to scalar/native-vector operations and the pipeline
needed to convert those into LLVM Dialect. The latter must be
re-usable across all pipelines used for CPU lowering.
@MaheshRavishankar
MaheshRavishankar force-pushed the dynamic_pass_pipeline_select branch from d9dfce9 to 4ea5ec9 Compare May 19, 2021 19:49
@MaheshRavishankar
MaheshRavishankar marked this pull request as ready for review May 19, 2021 19:49
@MaheshRavishankar
MaheshRavishankar force-pushed the dynamic_pass_pipeline_select branch from 68493fa to dceb970 Compare May 19, 2021 22:29

@asaadaldien asaadaldien left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants