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

[test] Update the wrong branch impl in test_cfg_continue #7305

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

galeselee
Copy link
Contributor

Issue: # related to #7293 conversation

Brief Summary

@netlify
Copy link

netlify bot commented Feb 6, 2023

Deploy Preview for docsite-preview canceled.

Name Link
🔨 Latest commit 113b197
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/63e06ee587cf6f000808551d

@galeselee galeselee marked this pull request as draft February 6, 2023 03:39
@galeselee
Copy link
Contributor Author

galeselee commented Feb 6, 2023

@jim19930609 @lin-hitonami
Unfortunately, when I run the code below an assertion error will be thrown.

import taichi as ti

ti.init(ti.cpu, print_kernel_llvm_ir=True)

def test_cfg_continue():
    x = ti.field(dtype=int, shape=1)
    state = ti.field(dtype=int, shape=1)

    @ti.kernel
    def foo():
        for p in range(1):
            if state[p] == 0:
                x[p] = 1
                continue

            x[p] = 100


    foo()
    print(x[0])
    assert x[0] == 1

test_cfg_continue()

Error info(and x[0] will be 0)

Traceback (most recent call last):
  File "cfg.py", line 23, in <module>
    test_cfg_continue()
  File "cfg.py", line 21, in test_cfg_continue
    assert x[0] == 1
AssertionError

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.

None yet

1 participant