Commit 5cbe607
Fix transpose_a support in LoRA Correction: remove getattr bug and wrong reduction_axis override
- Replace `getattr(node, "transpose_a", False)` (always returned False since
NNCFNode has no such attribute) with proper access via
`layer_attributes.input_attributes["transpose"]`, then remove the now-unused
`transpose_a_flag` and the `transpose_a` parameter from `calculate_low_rank_matrices`.
- Remove the `if transpose_a and reduction_axis != -1: reduction_axis = 1` block
which would have incorrectly overridden the H-axis group-quantization index
(e.g. setting it to 1 for a [H, O] weight where H is at axis 0).
- Revert the unrelated inlining of `backend`/`device` locals in
`WCTensorStatistic._get_serialized_data` to keep the diff focused.
- Fix the `process_stats` docstring to accurately describe the new
`transpose_a` parameter and the two possible return layouts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 3803aa6 commit 5cbe607
3 files changed
Lines changed: 8 additions & 10 deletions
File tree
- src/nncf
- common/tensor_statistics
- quantization/algorithms/weight_compression
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
279 | 281 | | |
280 | 282 | | |
281 | 283 | | |
282 | 284 | | |
283 | | - | |
| 285 | + | |
284 | 286 | | |
285 | | - | |
| 287 | + | |
286 | 288 | | |
287 | 289 | | |
288 | 290 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | | - | |
34 | | - | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | 127 | | |
129 | 128 | | |
130 | 129 | | |
| |||
134 | 133 | | |
135 | 134 | | |
136 | 135 | | |
137 | | - | |
138 | 136 | | |
139 | 137 | | |
140 | 138 | | |
| |||
150 | 148 | | |
151 | 149 | | |
152 | 150 | | |
153 | | - | |
154 | 151 | | |
155 | 152 | | |
156 | 153 | | |
| |||
185 | 182 | | |
186 | 183 | | |
187 | 184 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | 185 | | |
192 | 186 | | |
193 | 187 | | |
| |||
0 commit comments