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

condition statements in static loop fail silently #5729

Closed
YuCrazing opened this issue Aug 11, 2022 · 0 comments · Fixed by #5755
Closed

condition statements in static loop fail silently #5729

YuCrazing opened this issue Aug 11, 2022 · 0 comments · Fixed by #5755
Assignees
Labels
potential bug Something that looks like a bug but not yet confirmed

Comments

@YuCrazing
Copy link
Contributor

YuCrazing commented Aug 11, 2022

Version
taichi-nightly 1.0.5.post20220810

Describe the bug

import taichi as ti

@ti.func
def test_static_loop():
    for i in ti.static(range(5)):
        x = 0.1
        if x == 0.0:
            print("consition statement")
            break
        print("after condition")

@ti.kernel
def test_kernel():
    test_static_loop()

ti.init(arch=ti.cuda)

test_kernel()

Expected behavior:
Prints 5 after condition or raises an error.

Actual behavior:
Prints nothing and fails silently.

@YuCrazing YuCrazing added the potential bug Something that looks like a bug but not yet confirmed label Aug 11, 2022
@taichi-gardener taichi-gardener moved this to Untriaged in Taichi Lang Aug 11, 2022
@YuCrazing YuCrazing changed the title condition statements in static loop fails silently condition statements in static loop fail silently Aug 11, 2022
@qiao-bo qiao-bo moved this from Untriaged to In Progress in Taichi Lang Aug 12, 2022
Repository owner moved this from In Progress to Done in Taichi Lang Aug 31, 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: Done
2 participants