Fix optional bias and batch handling in cadence::fully_connected (#19194)#19194
Fix optional bias and batch handling in cadence::fully_connected (#19194)#19194hsharma35 wants to merge 2 commits intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19194
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 1 New Failure, 2 Unrelated FailuresAs of commit a1d8229 with merge base 5a206ab ( NEW FAILURE - The following job has failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@hsharma35 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D102821213. |
This PR needs a
|
…orch#19194) 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. Reviewed By: mcremon-meta Differential Revision: D102821213
8246093 to
506d3b8
Compare
…kernels (pytorch#19193) Summary: PR pytorch#19193 Fixes two correctness bugs in the HiFi kernels for cadence::quantized_conv1d_ncl.out and cadence::quantized_conv1d_nlc.out. The int8 path (xa_nn_conv2d_per_chan_sym8sxasym8s) produces incorrect results with stride > 1 on some backends (e.g., Artemis HiFi4) and is now redirected to the generic fallback for that case. The uint8 path overflowed WORD32 when computing out_multiplier32 if eff_scale >= 1.0 (i.e., output_scale > bias_scale), which is now clamped to INT32_MAX. Reviewed By: zonglinpeng Differential Revision: D102821209
…orch#19194) 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. Reviewed By: mcremon-meta Differential Revision: D102821213
506d3b8 to
a1d8229
Compare
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.
Reviewed By: mcremon-meta
Differential Revision: D102821213