Skip to content

Commit ea02973

Browse files
authored
[MISC] Migrate to GsTaichi 4.0.0. (#1975)
1 parent f440479 commit ea02973

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

genesis/utils/misc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,9 +469,9 @@ def _launch_kernel(self, t_kernel, compiled_kernel_data, *args):
469469
v_primal = v.arr
470470
v_grad = v.grad.arr if v.grad else None
471471
if v_grad is None:
472-
launch_ctx.set_arg_ndarray((i - template_num,), v_primal)
472+
launch_ctx.set_arg_ndarray(i - template_num, v_primal)
473473
else:
474-
launch_ctx.set_arg_ndarray_with_grad((i - template_num,), v_primal, v_grad)
474+
launch_ctx.set_arg_ndarray_with_grad(i - template_num, v_primal, v_grad)
475475
continue
476476

477477
# ti.field
@@ -505,7 +505,7 @@ def _launch_kernel(self, t_kernel, compiled_kernel_data, *args):
505505
nbytes = v.element_size() * v.nelement()
506506
grad_ptr = int(v.grad.data_ptr()) if v.grad is not None else 0
507507

508-
launch_ctx.set_arg_external_array_with_shape((i - template_num,), arr_ptr, nbytes, array_shape, grad_ptr)
508+
launch_ctx.set_arg_external_array_with_shape(i - template_num, arr_ptr, nbytes, array_shape, grad_ptr)
509509

510510
try:
511511
prog = impl.get_runtime().prog

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ readme = "README.md"
1010
requires-python = ">=3.10,<3.14"
1111
dependencies = [
1212
"psutil",
13-
"gstaichi==3.3.0",
13+
"gstaichi==4.0.0",
1414
"pydantic>=2.11.0",
1515
"numpy>=1.26.4",
1616
"trimesh",

0 commit comments

Comments
 (0)