Skip to content

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

Open
bluevisor wants to merge 1 commit into
taichi-dev:masterfrom
bluevisor:patch-4
Open

[Misc] Explicitly cast indices to int32 in snode_deactivate to preven…#8599
bluevisor wants to merge 1 commit into
taichi-dev:masterfrom
bluevisor:patch-4

Conversation

@bluevisor

Copy link
Copy Markdown

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… Nov 10, 2024
@feisuzhu

feisuzhu commented Mar 2, 2025

Copy link
Copy Markdown
Contributor

/rebase

@hughperkins

Copy link
Copy Markdown
Contributor

/rebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants