Repository navigation
Conversation
Two indexing simplification improvements: 1. FloorDiv(ModularIndexing(b, d1, m), d2) now simplifies to ModularIndexing(b, d1*d2, m//d2) when d2 divides m. This collapses a nested FloorDiv-over-ModularIndexing into a single ModularIndexing, producing cleaner index expressions for reshape + reduction patterns. 2. remove_zero_terms in visit_indexing_div is generalized: the condition for dropping a variable v from the base changes from requiring gcd(rest, divisor) == divisor to v < gcd(rest, divisor). This handles more cases where v is small enough not to affect the FloorDiv. Also adds base < divisor → 0 simplification for visit_indexing_div. Authored with Claude. [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/176345
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 9 New FailuresAs of commit c981b70 with merge base 2ff017b ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
Two indexing simplification improvements: 1. FloorDiv(ModularIndexing(b, d1, m), d2) now simplifies to ModularIndexing(b, d1*d2, m//d2) when d2 divides m. This collapses a nested FloorDiv-over-ModularIndexing into a single ModularIndexing, producing cleaner index expressions for reshape + reduction patterns. 2. remove_zero_terms in visit_indexing_div is generalized: the condition for dropping a variable v from the base changes from requiring gcd(rest, divisor) == divisor to v < gcd(rest, divisor). This handles more cases where v is small enough not to affect the FloorDiv. Also adds base < divisor → 0 simplification for visit_indexing_div. Authored with Claude. ghstack-source-id: 689c1ea Pull Request resolved: #176345
…ero_terms" Two indexing simplification improvements: 1. FloorDiv(ModularIndexing(b, d1, m), d2) now simplifies to ModularIndexing(b, d1*d2, m//d2) when d2 divides m. This collapses a nested FloorDiv-over-ModularIndexing into a single ModularIndexing, producing cleaner index expressions for reshape + reduction patterns. 2. remove_zero_terms in visit_indexing_div is generalized: the condition for dropping a variable v from the base changes from requiring gcd(rest, divisor) == divisor to v < gcd(rest, divisor). This handles more cases where v is small enough not to affect the FloorDiv. Also adds base < divisor → 0 simplification for visit_indexing_div. Authored with Claude. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo [ghstack-poisoned]
…ero_terms" Two indexing simplification improvements: 1. FloorDiv(ModularIndexing(b, d1, m), d2) now simplifies to ModularIndexing(b, d1*d2, m//d2) when d2 divides m. This collapses a nested FloorDiv-over-ModularIndexing into a single ModularIndexing, producing cleaner index expressions for reshape + reduction patterns. 2. remove_zero_terms in visit_indexing_div is generalized: the condition for dropping a variable v from the base changes from requiring gcd(rest, divisor) == divisor to v < gcd(rest, divisor). This handles more cases where v is small enough not to affect the FloorDiv. Also adds base < divisor → 0 simplification for visit_indexing_div. Authored with Claude. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo [ghstack-poisoned]
|
@pytorchbot merge |
Merge failedReason: This PR needs a If not, please add the To add a label, you can comment to pytorchbot, for example For more information, see Details for Dev Infra teamRaised by workflow job |
This PR needs a
|
|
@pytorchbot merge -i |
…176345) Two indexing simplification improvements: 1. FloorDiv(ModularIndexing(b, d1, m), d2) now simplifies to ModularIndexing(b, d1*d2, m//d2) when d2 divides m. This collapses a nested FloorDiv-over-ModularIndexing into a single ModularIndexing, producing cleaner index expressions for reshape + reduction patterns. 2. remove_zero_terms in visit_indexing_div is generalized: the condition for dropping a variable v from the base changes from requiring gcd(rest, divisor) == divisor to v < gcd(rest, divisor). This handles more cases where v is small enough not to affect the FloorDiv. Also adds base < divisor → 0 simplification for visit_indexing_div. Authored with Claude. Pull Request resolved: #176345 Approved by: https://github.com/shunting314
…ytorch#176345) Two indexing simplification improvements: 1. FloorDiv(ModularIndexing(b, d1, m), d2) now simplifies to ModularIndexing(b, d1*d2, m//d2) when d2 divides m. This collapses a nested FloorDiv-over-ModularIndexing into a single ModularIndexing, producing cleaner index expressions for reshape + reduction patterns. 2. remove_zero_terms in visit_indexing_div is generalized: the condition for dropping a variable v from the base changes from requiring gcd(rest, divisor) == divisor to v < gcd(rest, divisor). This handles more cases where v is small enough not to affect the FloorDiv. Also adds base < divisor → 0 simplification for visit_indexing_div. Authored with Claude. Pull Request resolved: pytorch#176345 Approved by: https://github.com/shunting314
…ytorch#176345) Two indexing simplification improvements: 1. FloorDiv(ModularIndexing(b, d1, m), d2) now simplifies to ModularIndexing(b, d1*d2, m//d2) when d2 divides m. This collapses a nested FloorDiv-over-ModularIndexing into a single ModularIndexing, producing cleaner index expressions for reshape + reduction patterns. 2. remove_zero_terms in visit_indexing_div is generalized: the condition for dropping a variable v from the base changes from requiring gcd(rest, divisor) == divisor to v < gcd(rest, divisor). This handles more cases where v is small enough not to affect the FloorDiv. Also adds base < divisor → 0 simplification for visit_indexing_div. Authored with Claude. Pull Request resolved: pytorch#176345 Approved by: https://github.com/shunting314
…ytorch#176345) Two indexing simplification improvements: 1. FloorDiv(ModularIndexing(b, d1, m), d2) now simplifies to ModularIndexing(b, d1*d2, m//d2) when d2 divides m. This collapses a nested FloorDiv-over-ModularIndexing into a single ModularIndexing, producing cleaner index expressions for reshape + reduction patterns. 2. remove_zero_terms in visit_indexing_div is generalized: the condition for dropping a variable v from the base changes from requiring gcd(rest, divisor) == divisor to v < gcd(rest, divisor). This handles more cases where v is small enough not to affect the FloorDiv. Also adds base < divisor → 0 simplification for visit_indexing_div. Authored with Claude. Pull Request resolved: pytorch#176345 Approved by: https://github.com/shunting314
Stack from ghstack (oldest at bottom):
Two indexing simplification improvements:
FloorDiv(ModularIndexing(b, d1, m), d2) now simplifies to
ModularIndexing(b, d1*d2, m//d2) when d2 divides m. This collapses
a nested FloorDiv-over-ModularIndexing into a single ModularIndexing,
producing cleaner index expressions for reshape + reduction patterns.
remove_zero_terms in visit_indexing_div is generalized: the condition
for dropping a variable v from the base changes from requiring
gcd(rest, divisor) == divisor to v < gcd(rest, divisor). This
handles more cases where v is small enough not to affect the FloorDiv.
Also adds base < divisor → 0 simplification for visit_indexing_div.
Authored with Claude.
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo