Genesis icon indicating copy to clipboard operation
Genesis copied to clipboard

[FEATURE] mpm_grid_op kernel optimization - coupler.py

Open ardabck opened this issue 11 months ago • 1 comments

Optimize mpm_grid_op kernel for performance and readability

  • Precomputed frequently used variables pos and mass_mpm to eliminate redundant calculations within the kernel.
  • Used ti.static for conditional checks on solver activity (Tool, Rigid, SPH, PBD) to enable Taichi compiler optimizations.
  • Improved code readability and maintainability while retaining original functionality.
  • Enhanced coupling efficiency for MPM <-> SPH and MPM <-> PBD by reducing computational overhead in nested loops.

This update enhances the overall performance of the mpm_grid_op kernel and lays groundwork for further optimizations.

ardabck avatar Dec 19 '24 09:12 ardabck

Thank you for (such a professional) PR! For prs like this, we would need someone to look into in detail, so please give us a bit time :)

zhouxian avatar Dec 22 '24 16:12 zhouxian

Hi @ardabck , Thank you for your work! However, I did not notice any substantial changes or improvements in this PR. We may not merge it at this time. Please let us know if you have any questions or other suggestions. Otherwise, I will close this PR in three days.

YilingQiao avatar Jan 04 '25 19:01 YilingQiao