Skip to content
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

[Opt] Make merging casts int(int(x)) less aggressive #7944

Merged
merged 1 commit into from
May 8, 2023

Conversation

ailzhang
Copy link
Contributor

@ailzhang ailzhang commented May 6, 2023

Fixes #7915

Brief Summary

🤖 Generated by Copilot at ed6302b

Fix a bug in alg_simp that removed casts between signed and unsigned integers. Add a test case in test_optimization to check the cast simplification.

Walkthrough

🤖 Generated by Copilot at ed6302b

  • Fix a bug in algebraic simplification that incorrectly removed some casts between signed and unsigned integers (link)
  • Add a test case to verify the correctness of the cast simplification after the bug fix (link)

@netlify
Copy link

netlify bot commented May 6, 2023

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit ed6302b
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/645617c63b4e6000080f7af0
😎 Deploy Preview https://deploy-preview-7944--docsite-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ailzhang ailzhang marked this pull request as ready for review May 6, 2023 09:03
@ailzhang ailzhang requested a review from lin-hitonami May 8, 2023 03:11
Copy link
Contributor

@lin-hitonami lin-hitonami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@lin-hitonami lin-hitonami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lin-hitonami lin-hitonami merged commit 975941d into taichi-dev:master May 8, 2023
quadpixels pushed a commit to quadpixels/taichi that referenced this pull request May 13, 2023
Fixes taichi-dev#7915 

### Brief Summary

<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at ed6302b</samp>

Fix a bug in `alg_simp` that removed casts between signed and unsigned
integers. Add a test case in `test_optimization` to check the cast
simplification.

### Walkthrough

<!--
copilot:walkthrough
-->
### <samp>🤖 Generated by Copilot at ed6302b</samp>

* Fix a bug in algebraic simplification that incorrectly removed some
casts between signed and unsigned integers
([link](https://github.com/taichi-dev/taichi/pull/7944/files?diff=unified&w=0#diff-77d8ca8e4dc6081988bd6dddb74bb9a5485af28ce3e0b43bc06d123256695513L63-R66))
* Add a test case to verify the correctness of the cast simplification
after the bug fix
([link](https://github.com/taichi-dev/taichi/pull/7944/files?diff=unified&w=0#diff-b8b031f0789413acece482512df4af5b8419a2a2dea3624b26114bbb9b57d334R146-R155))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] Type cast problem when using torch tensor as kernel args
2 participants