Skip to content

Commit

Permalink
add TI_PRINT_PREPROCESSED
Browse files Browse the repository at this point in the history
fix TI_PRINT_PROCESSED

no visit_Return from taichi-dev#536
  • Loading branch information
archibate committed Feb 27, 2020
1 parent 6eecced commit ae68a7b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/taichi/lang/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ def init(default_fp=None, default_ip=None, print_preprocessed=None, debug=None,
elif dfl_ip is not None:
raise ValueError(f'Unrecognized TI_DEFAULT_IP: {dfl_ip}, should be 32 or 64')

if print_preprocessed is None: # won't override
print_preprocessed = os.environ.get("TI_PRINT_PREPROCESSED")
if print_preprocessed is not None:
print_preprocessed = bool(int(print_preprocessed))

if default_fp is not None:
ti.get_runtime().set_default_fp(default_fp)
if default_ip is not None:
Expand Down

0 comments on commit ae68a7b

Please sign in to comment.