Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
lin-hitonami committed Nov 5, 2021
1 parent 033378e commit 97e051f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/taichi/lang/ast_builder_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ast
from enum import Enum

from taichi.lang.exception import TaichiSyntaxError
from enum import Enum


class Builder(object):
Expand Down
1 change: 0 additions & 1 deletion python/taichi/lang/ir_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,4 +726,3 @@ def build_stmts(ctx, stmts):
else:
result.append(stmt)
return result

6 changes: 6 additions & 0 deletions tests/python/test_ast_refactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ def func():
@ti.test(experimental_ast_refactor=True, print_preprocessed_ir=True)
def test_static_for_break():
n = 10

@ti.kernel
def foo(a: ti.template()):
for i in ti.static(range(n)):
Expand All @@ -438,6 +439,7 @@ def foo(a: ti.template()):
@ti.test(experimental_ast_refactor=True, print_preprocessed_ir=True)
def test_static_grouped_for_break():
n = 4

@ti.kernel
def foo(a: ti.template()):
for I in ti.static(ti.grouped(ti.ndrange(n, n))):
Expand All @@ -462,6 +464,7 @@ def foo(a: ti.template()):
@ti.test(experimental_ast_refactor=True, print_preprocessed_ir=True)
def test_static_for_continue():
n = 10

@ti.kernel
def foo(a: ti.template()):
for i in ti.static(range(n)):
Expand All @@ -483,6 +486,7 @@ def foo(a: ti.template()):
@ti.test(experimental_ast_refactor=True, print_preprocessed_ir=True)
def test_static_grouped_for_continue():
n = 4

@ti.kernel
def foo(a: ti.template()):
for I in ti.static(ti.grouped(ti.ndrange(n, n))):
Expand All @@ -505,6 +509,7 @@ def foo(a: ti.template()):
@ti.test(experimental_ast_refactor=True, print_preprocessed_ir=True)
def test_for_break():
n = 4

@ti.kernel
def foo(a: ti.template()):
for i in range(n):
Expand All @@ -530,6 +535,7 @@ def foo(a: ti.template()):
@ti.test(experimental_ast_refactor=True, print_preprocessed_ir=True)
def test_for_continue():
n = 4

@ti.kernel
def foo(a: ti.template()):
for i in range(n):
Expand Down

0 comments on commit 97e051f

Please sign in to comment.