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

A Bug about ti.Matrix Logical Operation #8656

Open
Zhao-Yu-Hui opened this issue Mar 6, 2025 · 0 comments
Open

A Bug about ti.Matrix Logical Operation #8656

Zhao-Yu-Hui opened this issue Mar 6, 2025 · 0 comments

Comments

@Zhao-Yu-Hui
Copy link

Describe the bug
Logical operations result is incorrect. It seem that or return the left while and return the right. Is it a bug or a feature?

To Reproduce

import taichi as ti

ti.init()
a = ti.Matrix([[True, True], [False, False]])
b = ti.Matrix([[True, False], [True, False]])

print("matrix a:\n", a)
print("matrix b:\n", b)
print("a and b:\n", a and b)
print("b and a:\n", b and a)
print("a or b:\n", a or b)
print("b or a:\n", b or a)
print("a * b: \n", a * b)

Log/Screenshots

[Taichi] version 1.7.3, llvm 15.0.4, commit 5ec301be, linux, python 3.11.11
[Taichi] Starting on arch=x64
matrix a:
 [[ True  True]
 [False False]]
matrix b:
 [[ True False]
 [ True False]]
a and b:
 [[ True False]
 [ True False]]
b and a:
 [[ True  True]
 [False False]]
a or b:
 [[ True  True]
 [False False]]
b or a:
 [[ True False]
 [ True False]]
a * b: 
 [[ True False]
 [False False]]

进程已结束,退出代码为 0

Additional comments
I tested it with cpu, vulkan and cuda, and got the same results.

This is my system info:

OS: Debian GNU/Linux 12 (bookworm) x86_64 
CPU: 11th Gen Intel i7-1165G7 (8) @ 4.700GHz
GPU: Intel TigerLake-LP GT2 [Iris Xe Graphics]
GPU: NVIDIA GeForce MX450
@github-project-automation github-project-automation bot moved this to Untriaged in Taichi Lang Mar 6, 2025
@Zhao-Yu-Hui Zhao-Yu-Hui changed the title An Bug about ti.Matrix Logical Operation A Bug about ti.Matrix Logical Operation Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Untriaged
Development

No branches or pull requests

1 participant