Commit 8246093
Fix optional bias and batch handling in cadence::fully_connected
Summary: Fixes two bugs in the generic and HiFi cadence::fully_connected implementations. First, the optional bias was dereferenced without a has_value() guard, causing a crash for bias-free inputs. Second, only the first input row was computed because the batch loop was missing; a loop over leading_dims (the product of all non-channel input dimensions) is now added to correctly process batched and multi-sequence inputs.
Differential Revision: D1028212131 parent 03d6db3 commit 8246093
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
0 commit comments