[Relax] Fix divide-by-zero in HasReshapePattern for zero-extent blocks#19961
[Relax] Fix divide-by-zero in HasReshapePattern for zero-extent blocks#19961cchung100m wants to merge 2 commits into
Conversation
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a check in HasReshapePattern to handle zero-extent loops and prevent potential crashes, along with corresponding unit tests. The reviewer suggests using ana_->CanProveEqual(v->dom->extent, 0) instead of is_zero(v->dom->extent) to robustly handle symbolic expressions that simplify to zero.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Hi Committers,
This PR addresses issue #19922 and #17745. Any suggestions would be appreciated if you are available.