-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[bug] Fix extraction of field with offset to external array #7945
Conversation
✅ Deploy Preview for docsite-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: btw there're many other built-in kernels that may require a similar fix ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can we add a few more tests to make sure every touched kernel is tested? ;) Thanks!
for more information, see https://pre-commit.ci
…ev#7945) Issue: taichi-dev#7775 ### Brief Summary <!-- copilot:summary --> ### <samp>🤖 Generated by Copilot at 44074b9</samp> This pull request adds support for offset tensors in Taichi, which are tensors with non-zero lower bounds for their index domains. It updates the `test_offset.py` file to add more tests, the `tensor_to_ext_arr` function to handle offset copying, and the `SNode` class to expose the offset attribute to Python. ### Walkthrough <!-- copilot:walkthrough --> ### <samp>🤖 Generated by Copilot at 44074b9</samp> * Add offset attribute to SNode class and expose it to Python interface ([link](https://github.com/taichi-dev/taichi/pull/7945/files?diff=unified&w=0#diff-af631a0c71978fe591e17005f01f7c06bc30ae36c65df306bbb3b08ade770167R471)) * Modify tensor_to_ext_arr function to account for offset attribute when copying data to external array ([link](https://github.com/taichi-dev/taichi/pull/7945/files?diff=unified&w=0#diff-09cd7b8194d05b7454b512d74fc5b442aed2319dcb763e182288b55753ce6feeL42-R48)) * Add test cases to check the correctness of offset tensor's data and conversion methods ([link](https://github.com/taichi-dev/taichi/pull/7945/files?diff=unified&w=0#diff-520d9ca52eed08ca617ef520e95d0d1778fb1943b9652f7a388b63abca00ddd1R148-R162), [link](https://github.com/taichi-dev/taichi/pull/7945/files?diff=unified&w=0#diff-520d9ca52eed08ca617ef520e95d0d1778fb1943b9652f7a388b63abca00ddd1R6)) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Issue: #7775
Brief Summary
🤖 Generated by Copilot at 44074b9
This pull request adds support for offset tensors in Taichi, which are tensors with non-zero lower bounds for their index domains. It updates the
test_offset.py
file to add more tests, thetensor_to_ext_arr
function to handle offset copying, and theSNode
class to expose the offset attribute to Python.Walkthrough
🤖 Generated by Copilot at 44074b9