Skip to content

Commit

Permalink
Auto Format
Browse files Browse the repository at this point in the history
  • Loading branch information
taichi-gardener committed Dec 24, 2021
1 parent d091224 commit ab3837a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/python/test_customized_grad.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ def func(mul: ti.f32):
ti.atomic_add(total[None], x[i] * mul)

with pytest.raises(RuntimeError):

@ti.ad.grad_for(func)
def backward(mul):
func.grad(mul)
Expand Down Expand Up @@ -216,6 +217,7 @@ def foward(mul):
func(mul)

with pytest.raises(RuntimeError):

@ti.ad.grad_for(func)
def backward(mul):
func.grad(mul)
Expand Down
6 changes: 5 additions & 1 deletion tests/python/test_offset.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,9 @@ def test_offset_must_throw_vector():
@ti.test()
def test_offset_must_throw_matrix():
with pytest.raises(AssertionError):
c = ti.Matrix.field(3, 3, dtype=ti.i32, shape=(32, 16, 8), offset=(32, 16))
c = ti.Matrix.field(3,
3,
dtype=ti.i32,
shape=(32, 16, 8),
offset=(32, 16))
d = ti.Matrix.field(3, 3, dtype=ti.i32, shape=None, offset=(32, 16))

0 comments on commit ab3837a

Please sign in to comment.