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

Assertion failure has different influence on GPU and CPU #6731

Open
FantasyVR opened this issue Nov 25, 2022 · 0 comments
Open

Assertion failure has different influence on GPU and CPU #6731

FantasyVR opened this issue Nov 25, 2022 · 0 comments
Assignees
Labels
potential bug Something that looks like a bug but not yet confirmed

Comments

@FantasyVR
Copy link
Collaborator

FantasyVR commented Nov 25, 2022

Describe the bug
Related issue: #6615

When arch=ti.gpu, assertion failure terminates the for loops directly. However, the for loop is not terminated on the CPU backend.

To Reproduce

import taichi as ti 

ti.init(arch=ti.gpu) # when arch=ti.cpu the output is different

@ti.kernel 
def test():
    for i in range(3):
        assert i == 1.0
        print(i)

test()

Log/Screenshots
When arch=ti.gpu the output is shown as:

[Taichi] version 1.3.0, llvm 15.0.4, commit 9c667572, linux, python 3.8.13
[Taichi] Starting on arch=cuda
1

When arch=ti.cpu the output is shown as:

[Taichi] version 1.3.0, llvm 15.0.4, commit 9c667572, linux, python 3.8.13
[Taichi] Starting on arch=x64
0
1
2
3

Additional comments
The final IR results on both backends are the same except that grid_dim and block_dim are different.

@FantasyVR FantasyVR added the potential bug Something that looks like a bug but not yet confirmed label Nov 25, 2022
@taichi-gardener taichi-gardener moved this to Untriaged in Taichi Lang Nov 25, 2022
@ailzhang ailzhang moved this from Untriaged to Todo in Taichi Lang Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential bug Something that looks like a bug but not yet confirmed
Projects
Status: Todo
Development

No branches or pull requests

2 participants