Commit 2748ed1
Remove arg index from the get_arg and set_arg of a torch Node (#12326)
Summary:
Instead of using the arg index, rely on the normalized kwargs dictionary for a uniform view of a node's arguments. This diff cleans up the get_arg and set_arg api so that callers do not need to additionally keep track of arg indices. This simplifies the calling code and also prevents unnecessary code maintenance in case the op signature changes thereby changing the relative positioning of the args within a node.
Reviewed By: abeakkas
Differential Revision: D779768381 parent bdbad3f commit 2748ed1
2 files changed
+46
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | 177 | | |
179 | | - | |
180 | | - | |
181 | 178 | | |
182 | 179 | | |
183 | | - | |
184 | | - | |
| 180 | + | |
185 | 181 | | |
186 | | - | |
187 | | - | |
188 | | - | |
| 182 | + | |
| 183 | + | |
189 | 184 | | |
190 | | - | |
191 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
192 | 196 | | |
193 | 197 | | |
194 | 198 | | |
195 | | - | |
| 199 | + | |
196 | 200 | | |
197 | 201 | | |
198 | | - | |
| 202 | + | |
199 | 203 | | |
200 | | - | |
201 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
202 | 225 | | |
203 | 226 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
787 | 787 | | |
788 | 788 | | |
789 | 789 | | |
790 | 790 | | |
791 | 791 | | |
792 | | - | |
| 792 | + | |
793 | 793 | | |
794 | 794 | | |
795 | 795 | | |
| |||
805 | 805 | | |
806 | 806 | | |
807 | 807 | | |
808 | | - | |
| 808 | + | |
809 | 809 | | |
810 | 810 | | |
811 | 811 | | |
812 | 812 | | |
813 | 813 | | |
814 | | - | |
815 | | - | |
| 814 | + | |
| 815 | + | |
816 | 816 | | |
817 | 817 | | |
818 | 818 | | |
| |||
0 commit comments