Commit 00333c4
[Inductor] Set prop_kind to forward_inference when grad is not needed for mkldnn_linear_pointwise and mkldnn_convolution_pointwise (pytorch#147072)
Summary:
The `prop_kind` of `mkldnn._linear_pointwise`, `mkldnn._linear_pointwise.binary`, `mkldnn._convolution_pointwise.binary` and `mkldnn._convolution_pointwise_.binary` are always `dnnl_forward`, i.e., `dnnl_forward_training` , regardless of whether `grad` is needed. Setting `prop_kind` to `dnnl_forward_inference` for these ops when `grad` is not needed could have better performance.
Pull Request resolved: pytorch#147072
Approved by: https://github.com/leslie-fang-intel, https://github.com/CaoE, https://github.com/jansel1 parent c4d59e6 commit 00333c4
File tree
3 files changed
+30
-10
lines changed- aten/src/ATen/native/mkldnn
3 files changed
+30
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
| 443 | + | |
443 | 444 | | |
444 | 445 | | |
445 | 446 | | |
| |||
456 | 457 | | |
457 | 458 | | |
458 | 459 | | |
459 | | - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
460 | 463 | | |
461 | 464 | | |
462 | 465 | | |
| |||
470 | 473 | | |
471 | 474 | | |
472 | 475 | | |
473 | | - | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
474 | 479 | | |
475 | 480 | | |
476 | 481 | | |
| |||
573 | 578 | | |
574 | 579 | | |
575 | 580 | | |
| 581 | + | |
576 | 582 | | |
577 | 583 | | |
578 | 584 | | |
| |||
584 | 590 | | |
585 | 591 | | |
586 | 592 | | |
587 | | - | |
| 593 | + | |
| 594 | + | |
588 | 595 | | |
589 | 596 | | |
590 | 597 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
190 | 198 | | |
191 | 199 | | |
192 | 200 | | |
| |||
238 | 246 | | |
239 | 247 | | |
240 | 248 | | |
241 | | - | |
| 249 | + | |
| 250 | + | |
242 | 251 | | |
243 | 252 | | |
244 | 253 | | |
245 | 254 | | |
246 | 255 | | |
247 | | - | |
| 256 | + | |
| 257 | + | |
248 | 258 | | |
249 | 259 | | |
250 | 260 | | |
| |||
317 | 327 | | |
318 | 328 | | |
319 | 329 | | |
| 330 | + | |
320 | 331 | | |
321 | 332 | | |
322 | 333 | | |
| |||
325 | 336 | | |
326 | 337 | | |
327 | 338 | | |
328 | | - | |
| 339 | + | |
| 340 | + | |
329 | 341 | | |
330 | 342 | | |
331 | | - | |
| 343 | + | |
332 | 344 | | |
333 | 345 | | |
334 | 346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | | - | |
| 276 | + | |
| 277 | + | |
277 | 278 | | |
278 | 279 | | |
279 | 280 | | |
| |||
0 commit comments