Commit e1a1aea
[1/N] Use
This PR uses `key in dict` expressions for existence checks of dict elements in Python code. This operation is more efficient than `key in dict.keys()`.
Pull Request resolved: pytorch#167035
Approved by: https://github.com/janeyx99key in dict for existence checks (pytorch#167035)1 parent 943227f commit e1a1aea
File tree
39 files changed
+50
-52
lines changed- torch
- _dynamo
- backends
- _export
- _inductor
- codegen
- _library
- _numpy
- ao/quantization
- backend_config
- pt2e
- autograd
- cuda
- distributed
- checkpoint
- elastic/multiprocessing
- fsdp
- pipelining
- tensor/_ops
- export
- fx
- experimental
- nested/_internal
- optim
- testing/_internal/distributed
- rpc
39 files changed
+50
-52
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2587 | 2587 | | |
2588 | 2588 | | |
2589 | 2589 | | |
2590 | | - | |
| 2590 | + | |
2591 | 2591 | | |
2592 | 2592 | | |
2593 | 2593 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | | - | |
| 446 | + | |
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
904 | 904 | | |
905 | 905 | | |
906 | 906 | | |
907 | | - | |
| 907 | + | |
908 | 908 | | |
909 | 909 | | |
910 | 910 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1681 | 1681 | | |
1682 | 1682 | | |
1683 | 1683 | | |
1684 | | - | |
| 1684 | + | |
1685 | 1685 | | |
1686 | 1686 | | |
1687 | 1687 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
| 340 | + | |
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| |||
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
722 | | - | |
| 722 | + | |
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
699 | 699 | | |
700 | 700 | | |
701 | 701 | | |
702 | | - | |
| 702 | + | |
703 | 703 | | |
704 | 704 | | |
705 | 705 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | | - | |
| 433 | + | |
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
| |||
0 commit comments