-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[TVM] Add importer for ONNX QLinearMatMul op #8952
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @cconvey for this first contribution!
@cconvey may need to rebase and resolve conflicts given that test_forward has changed. @anwang2009 and @mbrookhart if you get cycles on Friday could you help review? thanks! |
6ec8769
to
277be0c
Compare
277be0c
to
0fa7ac5
Compare
I just pushed a significantly revised version of the code, but it's not ready for review yet. |
0fa7ac5
to
55d4c20
Compare
1092db4
to
d15bc48
Compare
d15bc48
to
db25345
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments
db25345
to
0c00ab7
Compare
5f8b0d4
to
23748c1
Compare
@mbrookhart @AndrewZhaoLuo ready for (re)review. |
# express these constraints. | ||
matmul_result_dtype = "int32" | ||
|
||
matmul_result = _qnn.op.dense( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a TODO looking into refactoring this with regular MatMul code which handles broadcasting and the 3D cases already?
Feel free to assign it to you or me.
E.g.
TODO (AndrewZhaoLuo): ... or TODO(cconvey): ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking that this should probably be part of a larger discussion about what collection of matmul-related ops are provided by Relay / Relax. If you don't mind I'll bring the topic up in a different forum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean the Matmul code in onnx, which handles numpy style broadcasting. That one is just a frontend change on how we generate relay from frontend code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
23748c1
to
576377f
Compare
Also CC- @anwang2009 for the re-review |
e20764d
to
ec16e22
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Looks like you hit #9231 |
* adds importer code * enables `test_qlinearmatmul_2D` unit test
ec16e22
to
484fd9d
Compare
Thank you @cconvey @anwang2009 @AndrewZhaoLuo @mbrookhart the PR has been merged! |
* adds importer code * enables `test_qlinearmatmul_2D` unit test
* adds importer code * enables `test_qlinearmatmul_2D` unit test
* adds importer code * enables `test_qlinearmatmul_2D` unit test
adds importer code
enables
test_qlinearmatmul_2D
unit test