From b38acebacbdaa9234203de45ab7c75ac088e6c7d Mon Sep 17 00:00:00 2001 From: John Zheng Date: Sun, 10 Nov 2024 04:30:04 -0800 Subject: [PATCH] [Misc] explicitly cast indices to int32 in snode_deactivate to prevent TaichiWarning --- python/taichi/_kernels.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/taichi/_kernels.py b/python/taichi/_kernels.py index 7eddf53736a88..dd7140281b332 100644 --- a/python/taichi/_kernels.py +++ b/python/taichi/_kernels.py @@ -264,13 +264,13 @@ def field_fill_python_scope(F: template(), val: template()): @kernel def snode_deactivate(b: template()): for I in grouped(b): - deactivate(b, I) + deactivate(b, [int(i) for i in I]) @kernel def snode_deactivate_dynamic(b: template()): for I in grouped(b.parent()): - deactivate(b, I) + deactivate(b, [int(i) for i in I]) @kernel