Skip to content

Commit

Permalink
Merge pull request #14 from ailzhang/v1.1.0-fix
Browse files Browse the repository at this point in the history
Compatibility changes for upcoming Taichi v1.1.0
  • Loading branch information
ifsheldon committed Aug 10, 2022
2 parents 6736b11 + 26231ad commit 4039bf4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/stannum/tube.py
Expand Up @@ -2,8 +2,7 @@
import torch
from taichi.lang.impl import axes
from typing import Optional, Callable, Union, Tuple, List, Iterable, Dict, Any
from .utils import to_taichi_type, need_auto_clearing_fields
from taichi._lib.core.taichi_core import DataType as TiDataType
from .utils import to_taichi_type, need_auto_clearing_fields, TiDataType
from taichi.lang.field import ScalarField
from taichi.lang.matrix import MatrixField
from functools import partial
Expand Down
6 changes: 5 additions & 1 deletion src/stannum/utils.py
Expand Up @@ -5,7 +5,11 @@
from taichi.lang.kernel_impl import Kernel
from taichi.lang.matrix import MatrixField
from taichi.lang.field import ScalarField
from taichi._lib.core.taichi_core import DataType as TiDataType

if __ti_version >= (1, 1, 0):
from taichi._lib.core.taichi_python import DataType as TiDataType
else:
from taichi._lib.core.taichi_core import DataType as TiDataType
import torch
import taichi as ti

Expand Down

0 comments on commit 4039bf4

Please sign in to comment.