Commit 3e104bc
authored
feat: torch custom_op fix for rope (#569)
Fix after changes made in #568
torch.compile doesn't like returning input arguments. So, change the
return type of pybind fns to `void`, given that it's already an inplace
op.
PyTorch Library annotation is applied to a wrapper function for each
pybind op. Python API doesn't change. Both inplace and non-inplace
versions calls the annotated wrapper function.1 parent 4f40420 commit 3e104bc
File tree
5 files changed
+346
-147
lines changed- flashinfer-aot/csrc_aot
- python
- csrc
- flashinfer
- tests
5 files changed
+346
-147
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
109 | 103 | | |
110 | 104 | | |
111 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
24 | 23 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
31 | 28 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
36 | 32 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
43 | 37 | | |
44 | 38 | | |
45 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| |||
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
68 | | - | |
69 | | - | |
70 | 67 | | |
71 | 68 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
76 | 72 | | |
77 | 73 | | |
78 | 74 | | |
| |||
109 | 105 | | |
110 | 106 | | |
111 | 107 | | |
112 | | - | |
113 | | - | |
114 | 108 | | |
115 | 109 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
122 | 114 | | |
123 | 115 | | |
124 | 116 | | |
| |||
162 | 154 | | |
163 | 155 | | |
164 | 156 | | |
165 | | - | |
166 | | - | |
167 | 157 | | |
168 | 158 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
175 | 163 | | |
176 | 164 | | |
177 | 165 | | |
| |||
209 | 197 | | |
210 | 198 | | |
211 | 199 | | |
212 | | - | |
213 | | - | |
214 | 200 | | |
0 commit comments