Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 19, 2023
1 parent 20b800f commit da3fd35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion python/taichi/aot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@

def check_type_match(lhs, rhs):
if isinstance(lhs, MatrixType) and isinstance(rhs, MatrixType):
return lhs.n == rhs.n and lhs.m == rhs.m and (lhs.dtype == rhs.dtype or lhs.dtype is None or rhs.dtype is None)
return lhs.n == rhs.n and lhs.m == rhs.m and (lhs.dtype == rhs.dtype
or lhs.dtype is None
or rhs.dtype is None)
elif isinstance(lhs, MatrixType) or isinstance(rhs, MatrixType):
return False
else:
Expand Down
4 changes: 3 additions & 1 deletion tests/cpp/aot/python_scripts/graph_aot_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ def run0(base: int, arr: ti.types.ndarray(ndim=1, dtype=ti.i32)):
arr[i] += base + i

@ti.kernel
def run1(base: int, arr: ti.types.ndarray(ndim=1, dtype=ti.types.vector(1, ti.i32))):
def run1(base: int, arr: ti.types.ndarray(ndim=1,
dtype=ti.types.vector(1,
ti.i32))):
for i in arr:
arr[i] += base + i

Expand Down

0 comments on commit da3fd35

Please sign in to comment.