We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Matrix multiplication between n1 and 1n vector will cause compilation error.
To Reproduce
import taichi as ti ti.init() @ti.kernel def fun(): a = ti.Vector([0.0, 0.0]) print(a @ a.transpose()) fun()
Log/Screenshots
{15:04}~/playground:dev ✗ ➭ p test_ra.py [Taichi] version 1.1.3, llvm 10.0.0, commit 9a35e049, linux, python 3.8.5 [Taichi] Starting on arch=x64 Traceback (most recent call last): File "test_ra.py", line 9, in <module> fun() File "/home/bx2k/git/taichi/python/taichi/lang/kernel_impl.py", line 917, in wrapped raise type(e)('\n' + str(e)) from None taichi.lang.exception.TaichiCompilationError: File "test_ra.py", line 7, in fun: print(a @ a.transpose()) ^^^^^^^^^^^^^^^^^ Traceback (most recent call last): File "/home/bx2k/git/taichi/python/taichi/lang/ast/ast_transformer_utils.py", line 25, in __call__ return method(ctx, node) File "/home/bx2k/git/taichi/python/taichi/lang/ast/ast_transformer.py", line 738, in build_BinOp node.ptr = op(node.left.ptr, node.right.ptr) File "/home/bx2k/git/taichi/python/taichi/lang/ast/ast_transformer.py", line 736, in <lambda> ast.MatMult: lambda l, r: l @ r, File "/home/bx2k/git/taichi/python/taichi/lang/matrix.py", line 564, in __matmul__ return other.transpose() @ self File "/home/bx2k/git/taichi/python/taichi/lang/matrix.py", line 566, in __matmul__ assert self.m == other.n, f"Dimension mismatch between shapes ({self.n}, {self.m}), ({other.n}, {other.m})" AssertionError: Dimension mismatch between shapes (2, 1), (2, 1)
Additional comments This bug seems to be related to PR #6014 .
The text was updated successfully, but these errors were encountered:
cc: @AD1024
Sorry, something went wrong.
Thanks! Just working on a PR
[lang] Preserve shape info for Vectors (#6076)
5b05116
Related issue = fix #6067
Successfully merging a pull request may close this issue.
Describe the bug
Matrix multiplication between n1 and 1n vector will cause compilation error.
To Reproduce
Log/Screenshots
Additional comments
This bug seems to be related to PR #6014 .
The text was updated successfully, but these errors were encountered: