Repository navigation
Commit 2e8e5a0
[ET-VK][qconv] Fix depthwise weight_sums sum dimension
Pull Request resolved: pytorch#17504
The weight_sums tensor stores per-output-channel sums of quantized weight values, used to apply activation zero point correction during integer accumulation. For depthwise convolutions, the weight tensor is reshaped to (H, W, OC), but the sum was unconditionally computed along dim=1 (the W dimension). This produced a tensor of shape (H, OC) instead of (OC,), causing incorrect zero point correction and corrupted depthwise conv output.
Fix by branching on is_depthwise_conv to sum over dims (0, 1) for the (H, W, OC) layout.
ghstack-source-id: 342806069
@exported-using-ghexport
Differential Revision: [D93511635](https://our.internmc.facebook.com/intern/diff/D93511635/)1 parent 0c87468 commit 2e8e5a0
1 file changed
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
219 | | - | |
220 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
221 | 229 | | |
222 | 230 | | |
223 | 231 | | |
| |||
0 commit comments