Commit 4884bc5
[Quantizer][XNNPACK] Fix ReLU fusion when conv/linear has > 1 user (pytorch#140846)
Summary:
X-link: pytorch/executorch#6894
Bug in quantizer when Conv + ReLU is fused even when the preceeding conv has more than one user. Conv and ReLU can not be fused in this case because the result of Conv must be used elsewhere.
XNNPACK Delegate naturally handles this by inserting a clamp node for ReLU.
Test Plan: CI
Reviewed By: digantdesai
Differential Revision: D659895991 parent 081c168 commit 4884bc5
1 file changed
+21
-0
lines changedLines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
250 | 254 | | |
251 | 255 | | |
252 | 256 | | |
| |||
351 | 355 | | |
352 | 356 | | |
353 | 357 | | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
354 | 363 | | |
355 | 364 | | |
356 | 365 | | |
| |||
738 | 747 | | |
739 | 748 | | |
740 | 749 | | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
741 | 756 | | |
742 | 757 | | |
743 | 758 | | |
| |||
860 | 875 | | |
861 | 876 | | |
862 | 877 | | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
863 | 883 | | |
864 | 884 | | |
865 | 885 | | |
| |||
1003 | 1023 | | |
1004 | 1024 | | |
1005 | 1025 | | |
| 1026 | + | |
1006 | 1027 | | |
1007 | 1028 | | |
1008 | 1029 | | |
| |||
0 commit comments