Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TOPI] Add handwritten matvec for dynamic cases #13423

Merged
merged 7 commits into from
Nov 21, 2022

Conversation

tkonolige
Copy link
Contributor

@tkonolige tkonolige commented Nov 17, 2022

Add a handwritten matrix-vector multiplication implementation for dynamic cases on cpu. This avoids crashing when a dynamic shape is present. Only supports vector LHS and float32 for now.

@tvm-bot
Copy link
Collaborator

tvm-bot commented Nov 17, 2022

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

  • No users to tag found in teams: topi See #10317 for details
  • Built docs for commit e690737 can be found here.

Generated by tvm-bot

@tvm-bot
Copy link
Collaborator

tvm-bot commented Nov 17, 2022

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

  • No users to tag found in teams: topi See #10317 for details

Generated by tvm-bot

Copy link
Contributor

@jwfromm jwfromm left a comment

Choose a reason for hiding this comment

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

This all makes sense to me, I left a few nitpicks but otherwise should be good to go.

python/tvm/relay/op/strategy/x86.py Outdated Show resolved Hide resolved
python/tvm/relay/op/strategy/x86.py Outdated Show resolved Hide resolved
@tkonolige
Copy link
Contributor Author

@jwfromm a change: the dynamic kernel usage is predicated on it being a matrix-vector multiply instead of asserting within the kernel. Apparently there are some other code paths that do dynamic matmul that I broke.

@jwfromm
Copy link
Contributor

jwfromm commented Nov 18, 2022

Yeah that makes perfect sense to me, good change.

@tkonolige
Copy link
Contributor Author

@tvm-bot rerun

2 similar comments
@michalpiszczek
Copy link
Contributor

@tvm-bot rerun

@michalpiszczek
Copy link
Contributor

@tvm-bot rerun

Tristan Konolige added 6 commits November 18, 2022 16:28
Add a handwritten matrix-vector multiplication implementation for
dynamic cases on cpu. This avoids crashing when a dynamic shape is
present.
Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

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

LGTM!

@junrushao junrushao merged commit 545f8dc into apache:main Nov 21, 2022
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
Add a handwritten matrix-vector multiplication implementation for
dynamic cases on cpu. This avoids crashing when a dynamic shape is
present.
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.

None yet

5 participants