Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bug] Fix argpack with struct and vector (#8403)
Issue: #8385 ### Brief Summary <!-- copilot:summary --> ### <samp>🤖 Generated by Copilot at 33db838</samp> Added support for struct arguments in kernels using `ArgPack` types and fixed a bug with nested struct offsets. Added tests for `ArgPack` with struct and vector types. ### Walkthrough <!-- copilot:walkthrough --> ### <samp>🤖 Generated by Copilot at 33db838</samp> * Import `Struct` class from `taichi.lang.struct` to support struct arguments ([link](https://github.com/taichi-dev/taichi/pull/8403/files?diff=unified&w=0#diff-ca7ad70b7884646820303ff5b04a8fd2aa7396cf4b1c7a5947a2bdf651d37a48L12-R12)) * Update `isinstance` check to include `Struct` as a possible data type ([link](https://github.com/taichi-dev/taichi/pull/8403/files?diff=unified&w=0#diff-ca7ad70b7884646820303ff5b04a8fd2aa7396cf4b1c7a5947a2bdf651d37a48L343-R343)) * Fix offset bug for nested structs by moving iterator back one position ([link](https://github.com/taichi-dev/taichi/pull/8403/files?diff=unified&w=0#diff-aea65318c1059505b73cd497b15f153d5439631cfad19f0f55061f5efa8f4272L209-R209)) * Add three tests for passing struct and vector types as `ArgPack` elements to kernels in `test_argpack.py` ([link](https://github.com/taichi-dev/taichi/pull/8403/files?diff=unified&w=0#diff-b84304006655e02b7d4e51469ac99f189f031d811e50a32477fb6b6c19ab4fd6R27-R53))
- Loading branch information