Skip to content

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
@feisuzhu
Copy link
Contributor

feisuzhu commented Mar 2, 2025

/rebase

@hughperkins
Copy link
Contributor

/rebase

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.

3 participants