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

[fix] vec * mat in matmul in onnx converter #11174

Merged
merged 5 commits into from
Apr 29, 2022

Conversation

ganler
Copy link
Contributor

@ganler ganler commented Apr 28, 2022

Should fix #10651 for ONNX converter.

cc: @masahi

@ganler
Copy link
Contributor Author

ganler commented Apr 29, 2022

@masahi CI finally passed! I think we can also close the issue after the merge. :-)

@masahi masahi merged commit 9ea4fa2 into apache:main Apr 29, 2022
@ganler ganler deleted the fix-onnx-vec-matmul branch May 5, 2022 05:05
shtinsa pushed a commit to Deelvin/tvm that referenced this pull request May 17, 2022
* fix: vec * mat in matmul in onnx converter

* fix: pylint

* fix: vec-mat matmul

* fix test

* fix test
SebastianBoblest pushed a commit to SebastianBoblest/tvm that referenced this pull request May 27, 2022
* fix: vec * mat in matmul in onnx converter

* fix: pylint

* fix: vec-mat matmul

* fix test

* fix test
juda pushed a commit to juda/tvm that referenced this pull request Jun 21, 2022
* fix: vec * mat in matmul in onnx converter

* fix: pylint

* fix: vec-mat matmul

* fix test

* fix test
junrushao pushed a commit that referenced this pull request Nov 21, 2022
…n.matmul check (#13448)

This PR brings 2 bug fixes:
1. ONNX converter for matmul: ONNX matmul follows NumPy [rules](https://numpy.org/doc/stable/reference/generated/numpy.matmul.html):
> If the first argument is 1-D, it is promoted to a matrix by prepending a 1 to its dimensions. After matrix multiplication the prepended 1 is removed.
> If the second argument is 1-D, it is promoted to a matrix by appending a 1 to its dimensions. After matrix multiplication the appended 1 is removed.

The (my) previous fix #11174 did not consider the second rule (append 1 dimension for the rhs vector).

2. Relay's `nn.matmul` takes 2-D matrices and the checker was removed in a recent PR #13287. This PR puts the checker back to prevent process crashes (make it a readable TVMError) for readability (and also for that the CI in ise-uiuc/nnsmith#64 won't be terminated while using TVM-10).
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
…n.matmul check (apache#13448)

This PR brings 2 bug fixes:
1. ONNX converter for matmul: ONNX matmul follows NumPy [rules](https://numpy.org/doc/stable/reference/generated/numpy.matmul.html):
> If the first argument is 1-D, it is promoted to a matrix by prepending a 1 to its dimensions. After matrix multiplication the prepended 1 is removed.
> If the second argument is 1-D, it is promoted to a matrix by appending a 1 to its dimensions. After matrix multiplication the appended 1 is removed.

The (my) previous fix apache#11174 did not consider the second rule (append 1 dimension for the rhs vector).

2. Relay's `nn.matmul` takes 2-D matrices and the checker was removed in a recent PR apache#13287. This PR puts the checker back to prevent process crashes (make it a readable TVMError) for readability (and also for that the CI in ise-uiuc/nnsmith#64 won't be terminated while using TVM-10).
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.

[Bug][ONNX] MatMul in dense_alter_op
2 participants