Skip to content

Commit

Permalink
no print_preprocessed or 1
Browse files Browse the repository at this point in the history
  • Loading branch information
archibate committed Feb 27, 2020
1 parent 5d60fd8 commit 4113b0d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/taichi/lang/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def do_compile(self):
func_body = tree.body[0]
func_body.decorator_list = []

if get_runtime().print_preprocessed or 1:
if get_runtime().print_preprocessed:
import astor
print('Before preprocessing:')
print(astor.to_source(tree.body[0], indent_with=' '))
Expand All @@ -59,7 +59,7 @@ def do_compile(self):
visitor.visit(tree)
ast.fix_missing_locations(tree)

if get_runtime().print_preprocessed or 1:
if get_runtime().print_preprocessed:
import astor
print('After preprocessing:')
print(astor.to_source(tree.body[0], indent_with=' '))
Expand Down Expand Up @@ -213,7 +213,7 @@ def materialize(self, key=None, args=None, arg_features=None):

src = remove_indent(inspect.getsource(self.func))
tree = ast.parse(src)
if self.runtime.print_preprocessed or 1:
if self.runtime.print_preprocessed:
import astor
print('Before preprocessing:')
print(astor.to_source(tree.body[0]))
Expand All @@ -239,7 +239,7 @@ def materialize(self, key=None, args=None, arg_features=None):
visitor.visit(tree)
ast.fix_missing_locations(tree)

if self.runtime.print_preprocessed or 1:
if self.runtime.print_preprocessed:
import astor
print('After preprocessing:')
print(astor.to_source(tree.body[0], indent_with=' '))
Expand Down

0 comments on commit 4113b0d

Please sign in to comment.