Skip to content

Commit

Permalink
[math] Remove the logs that taichi.init() print (#609)
Browse files Browse the repository at this point in the history
  • Loading branch information
Routhleck authored Feb 1, 2024
1 parent bde7f8a commit a9996f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions brainpy/_src/math/op_register/taichi_aot_based.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import contextlib
import hashlib
import inspect
import io
import os
import pathlib
import platform
Expand Down Expand Up @@ -173,8 +175,8 @@ def _build_kernel(
arch = ti.cuda
else:
raise ValueError(f'Unknown device: {device}')

ti.init(arch=arch)
with contextlib.redirect_stdout(io.StringIO()):
ti.init(arch=arch)

# check arch is available
if ti.lang.impl.current_cfg().arch != arch:
Expand Down

0 comments on commit a9996f3

Please sign in to comment.