taichi-dev / taichi

Productive, portable, and performant GPU programming in Python.
https://taichi-lang.org
Apache License 2.0
25.56k stars 2.29k forks source link

[Misc] Explicitly cast indices to int32 in snode_deactivate to preven… #8599

Open bluevisor opened 2 weeks ago

bluevisor commented 2 weeks ago

Summary

This PR addresses a Taichi warning in _kernels.py that occurs during implicit casting in the snode_deactivate function. The warning was as follows:

TaichiWarning: Field index not int32, casting into int32 implicitly

Changes Made

Rationale

Explicitly casting to int32 prevents the warning and ensures that the code adheres to expected data types.

Testing