Skip to content

Commit

Permalink
Updated test to reflect recent drjit API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bathal1 committed Jul 19, 2022
1 parent df9dade commit 9e02031
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_cholesky.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,14 @@ def test_frameworks(framework):
solver = CholeskySolverF(n_verts, drjit.cuda.TensorXi(idx[0]), drjit.cuda.TensorXi(idx[1]), drjit.cuda.TensorXf64(values), MatrixType.COO)

b_drjit = drjit.cuda.TensorXf(b)
x_drjit = drjit.zero(drjit.cuda.TensorXf, b.shape)
x_drjit = drjit.zeros(drjit.cuda.TensorXf, b.shape)
solver.solve(b_drjit, x_drjit)
assert(np.allclose(x_drjit.numpy(), x_ref))

# Test with DrJIT - CPU
solver = CholeskySolverF(n_verts, drjit.llvm.TensorXi(idx[0]), drjit.llvm.TensorXi(idx[1]), drjit.llvm.TensorXf64(values), MatrixType.COO)

b_drjit = drjit.llvm.TensorXf(b)
x_drjit = drjit.zero(drjit.llvm.TensorXf, b.shape)
x_drjit = drjit.zeros(drjit.llvm.TensorXf, b.shape)
solver.solve(b_drjit, x_drjit)
assert(np.allclose(x_drjit.numpy(), x_ref))

0 comments on commit 9e02031

Please sign in to comment.