Skip to content

[CodeGen] Plumb conv vectorization through flow.dispatch.workgroups - #4999

Merged
antiagainst merged 24 commits into
iree-org:mainfrom
antiagainst:conv-tensor
Mar 11, 2021
Merged

antiagainst merged 24 commits into
iree-org:mainfrom
antiagainst:conv-tensor

Conversation

@antiagainst

@antiagainst antiagainst commented Mar 4, 2021 •

Copy link
Copy Markdown
Member

This commit adds all necessary plumbing to connect 2-D (depthwise)
convolution vectorization inside flow.dispatch.workgroups. This includes:

  • Let 2-D (depthwise) convolution be recognized as a root op
    during dispatch region formation.
  • Add a pass to concretize the abstract tiling and distribution
    during flow dispatch region formation. It substitutes symbolic
    ops with concrete values from CodeGen policy.
  • Recognize hal.interface.workgroup.id ops when folding GPU
    processor ID uses.
  • Recognize hal.interface.binding.subspan when vectorizing
    memrefs for better memory access.

This commit adds all necessary plumbing to connet 2-D convolution
vectorization inside flow.dispatch.workgroups. This includes:

* Let 2-D convolution be recognized as a root op during dispatch
  region formation.
* Add a pass to concretize the abstract tiling and distribution
  during flow dispatch region formation. It subsitutes symbolic
  ops with concrete values from CodeGen policy.
* Recognize `hal.interface.workgroup.id` ops when folding GPU
  processor ID uses.
* Recognize `hal.interface.binding.subspan` when vectorizing memrefs
  for better memory access.
@google-cla google-cla Bot added the cla: yes label Mar 4, 2021
@antiagainst

Copy link
Copy Markdown
Member Author

@MaheshRavishankar MaheshRavishankar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Pushing partial review. This is looking great so far! Thanks for the refactoring folded into this. I need to review the DispatchLinalgOnTensors file, but left one comment on removing unit-trip count loops in the time being.

@MaheshRavishankar MaheshRavishankar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just one last comment to address, and I think we can land this and address after that.

@MaheshRavishankar MaheshRavishankar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ok thanks. Lets land this and then try to fix the hard edges here.

@antiagainst
antiagainst merged commit 7116f0c into iree-org:main Mar 11, 2021
GMNGeoffrey added a commit to GMNGeoffrey/iree that referenced this pull request Mar 11, 2021
GMNGeoffrey added a commit that referenced this pull request Mar 11, 2021
@antiagainst
antiagainst deleted the conv-tensor branch March 11, 2021 19:39
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.

3 participants