Skip to content

Support misaligned matmul using vectorization analysis#2105

Merged
jacobhinkle merged 52 commits intomainfrom
matmul_vectorization_analysis
May 13, 2024
Merged

Support misaligned matmul using vectorization analysis#2105
jacobhinkle merged 52 commits intomainfrom
matmul_vectorization_analysis

Conversation

@jacobhinkle
Copy link
Collaborator

@jacobhinkle jacobhinkle commented Apr 18, 2024

This change collects the maximum supported vectorization size for A, B, and "epilogue" and attaches these to MatmulParams. In case any "C" role tensors like bias are provided, they are considered when computing epilogue vectorization. This information becomes available to heuristic plugins also.

Fixes #2083. Fixes #983. Related to existing PR #807. (Related to issue #682 but I'm not sure yet if this approach will fix it).

@jacobhinkle jacobhinkle changed the title [WIP] Support misaligned matmul using vectorization analysis Support misaligned matmul using vectorization analysis Apr 19, 2024
@jacobhinkle jacobhinkle marked this pull request as ready for review April 19, 2024 18:35
@jacobhinkle
Copy link
Collaborator Author

!build --diff

This changes SchedulerRuntimeInfo in a way that I believe is safe, but
it will also require some review.
@jacobhinkle
Copy link
Collaborator Author

!build

Copy link
Collaborator

@zasdfgbnm zasdfgbnm left a comment

Choose a reason for hiding this comment

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

I still think maxRowVectorization needs change, but consider that:

  1. The rest of this PR LGTM
  2. Even as-is, this PR is a strict improvement on what we have on main
  3. I will be off tomorrow and next week, I don't want to block this for one week.

I am OK with merging this as-is and fix maxRowVectorization in a future PR.

@jacobhinkle
Copy link
Collaborator Author

!build

Co-authored-by: Gao, Xiang <qasdfgtyuiop@gmail.com>
@jacobhinkle
Copy link
Collaborator Author

!build

@jacobhinkle
Copy link
Collaborator Author

!build

@jacobhinkle jacobhinkle merged commit f51110f into main May 13, 2024
@jacobhinkle jacobhinkle deleted the matmul_vectorization_analysis branch May 13, 2024 16:04
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.

Matmul Schedules requires vectorization Analysis, it is currently hard coded Correctly set the vectorization size for matmul scheduler

2 participants