Commit f1c49c9
Checking if the input is finite before calculation in lowering of pow func (pytorch#167723)
Fixes pytorch#167197
The inductor backend is trying to convert the float infinity value to an integer in pow lowering (possibly for indexing, iteration counts, or type conversions). Python/C++ cannot convert float('inf') to an integer, causing the overflow error
Pull Request resolved: pytorch#167723
Approved by: https://github.com/shunting3141 parent 265397e commit f1c49c9
File tree
2 files changed
+36
-1
lines changed- test/inductor
- torch/_inductor
2 files changed
+36
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5528 | 5528 | | |
5529 | 5529 | | |
5530 | 5530 | | |
| 5531 | + | |
| 5532 | + | |
| 5533 | + | |
| 5534 | + | |
| 5535 | + | |
| 5536 | + | |
| 5537 | + | |
| 5538 | + | |
| 5539 | + | |
| 5540 | + | |
| 5541 | + | |
| 5542 | + | |
| 5543 | + | |
| 5544 | + | |
| 5545 | + | |
| 5546 | + | |
| 5547 | + | |
| 5548 | + | |
| 5549 | + | |
| 5550 | + | |
| 5551 | + | |
| 5552 | + | |
| 5553 | + | |
| 5554 | + | |
| 5555 | + | |
| 5556 | + | |
5531 | 5557 | | |
5532 | 5558 | | |
5533 | 5559 | | |
| |||
6307 | 6333 | | |
6308 | 6334 | | |
6309 | 6335 | | |
| 6336 | + | |
| 6337 | + | |
| 6338 | + | |
| 6339 | + | |
| 6340 | + | |
| 6341 | + | |
| 6342 | + | |
| 6343 | + | |
| 6344 | + | |
6310 | 6345 | | |
6311 | 6346 | | |
6312 | 6347 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6361 | 6361 | | |
6362 | 6362 | | |
6363 | 6363 | | |
6364 | | - | |
| 6364 | + | |
6365 | 6365 | | |
6366 | 6366 | | |
6367 | 6367 | | |
| |||
0 commit comments