Skip to content

Integrate Linalg on tensors path to rest of CPU backend (Part 1) - #4563

Merged
MaheshRavishankar merged 3 commits into
iree-org:mainfrom
MaheshRavishankar:linalg_on_tensors_1
Jan 21, 2021
Merged

MaheshRavishankar merged 3 commits into
iree-org:mainfrom
MaheshRavishankar:linalg_on_tensors_1

Conversation

@MaheshRavishankar

@MaheshRavishankar MaheshRavishankar commented Jan 20, 2021 •

Copy link
Copy Markdown
Collaborator

Current implementation of the Linalg on tensors path is only tested
with static tile sizes specified at command line. In this PR

  • Use flow.dispatch.workgroup.size to represent the dynamic tile
    size used
  • After conversion to HAL, where flow.dispatch.workgroup.size gets
    replaced by hal.interface.workgroup.size, use LaunchConfig to set
    the value of hal.interface.workgroup.size to a static value.
  • This effectively replace the first level of tiling done by the
    existing codegen paths. The rest of the codegen can then be used
    with this path.
    Also included all minor fixes needed to plumb everything through.

Current implementation of the Linalg on tensors path is only tested
with static tile sizes specified at command line. In this PR
- Use `flow.dispatch.workgroup.size` to represetn the dynamic tile
  size used
- After conversion to HAL, where `flow.dispatch.workgroup.size` gets
  replaced by `hal.interface.workgroup.size`, use LaunchConfig to set
  the value of `hal.interface.workgroup.size` to a static value.
- This effectively replace the first level of tiling done by the
  existing codegen paths. The rest of the codegen can then be used
  with this path.
Also included all minor fixes needed to plumb everything through.
@@ -0,0 +1,65 @@
// Copyright 2020 Google LLC

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.

We are in 2021 now. :p
(I'm not pretty sure if we update license in new files to 2021)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I changed it to 2019. I think we have a script for license headers?

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.

We have a script to generate the cmakelist file with copyright. If the cmakelist file already has copyright, it will be ignored. Otherwise, the copyright will be datetime.date.today().year. Thus I think all new files should use the current year. But I guess it is not a big deal, I actually don't really know the convention about this.

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.

Year should match when the file was created (which could be different from when the file was committed to a branch). Do not update the year when moving or copying a file. Do not update the year when the year changes.

@MaheshRavishankar
MaheshRavishankar merged commit 8840c6c into iree-org:main Jan 21, 2021
@MaheshRavishankar
MaheshRavishankar deleted the linalg_on_tensors_1 branch January 21, 2021 18:06
@hanhanW hanhanW mentioned this pull request Jan 22, 2021
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.

4 participants