Skip to content

Commit

Permalink
[math] depress taichi import logging by forcing using `import_taichi(…
Browse files Browse the repository at this point in the history
…)` utility, move taichi random functions into another file
  • Loading branch information
chaoming0625 committed Dec 9, 2023
1 parent 4eb88c1 commit bffcd0a
Show file tree
Hide file tree
Showing 8 changed files with 1,008 additions and 1,111 deletions.
2 changes: 1 addition & 1 deletion brainpy/_src/dependency_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

taichi_install_info = (f'We need taichi=={_minimal_taichi_version}. '
f'Currently you can install taichi=={_minimal_taichi_version} through:\n\n'
'> pip install taichi==1.7.0 -U')
'> pip install taichi==1.7.0')
os.environ["TI_LOG_LEVEL"] = "error"


Expand Down
4 changes: 3 additions & 1 deletion brainpy/_src/math/event/_csr_matvec_taichi.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
import jax
import jax.numpy as jnp
import numpy as np
import taichi as ti
from jax.interpreters import ad

from brainpy._src.dependency_check import import_taichi
from brainpy._src.math.interoperability import as_jax
from brainpy._src.math.op_register import XLACustomOp
from brainpy._src.math.sparse._csr_mv_taichi import csrmv_taichi as normal_csrmv_taichi
from brainpy._src.math.sparse._utils import csr_to_coo

ti = import_taichi()

__all__ = [
'csrmv_taichi'
]
Expand Down
Loading

0 comments on commit bffcd0a

Please sign in to comment.