-
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] Field with offset cannot print or to_numpy #7775
Comments
I believe this bug has been there for a while.... @chunleili would you mind help verifying if this was true for old taichi versions? Btw the fix for it is kinda simple but we probably need to spread this in many places... https://github.com/taichi-dev/taichi/compare/master...ailzhang:example_fix?expand=1 |
dream189free
added a commit
that referenced
this issue
May 11, 2023
Issue: #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>
quadpixels
pushed a commit
to quadpixels/taichi
that referenced
this issue
May 13, 2023
…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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Field with offset cannot print or to_numpy
To Reproduce
Log/Screenshots
Please post the full log of the program (instead of just a few lines around the error message, unless the log is > 1000 lines). This will help us diagnose what's happening. For example:
The text was updated successfully, but these errors were encountered: