Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bluevisor
Copy link

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

  • Updated snode_deactivate to explicitly cast each element in I to int32 before calling deactivate, which suppresses the implicit casting warning.

Rationale

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

Testing

  • Verified that the warning no longer appears when running code that triggers snode_deactivate.
  • Confirmed that snode_deactivate still functions as expected post-update.

@bluevisor bluevisor changed the title [Misc] explicitly cast indices to int32 in snode_deactivate to preven… [Misc] Explicitly cast indices to int32 in snode_deactivate to preven… Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant