Optimized linear op doesn't support bias
Open
@VarunSai02 is already working on this.
Since Sep 2, 2026.
actionable
enhancement
good first issue
module: kernels
triaged
- Dominant language
- Python
- Stars
- 5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 581
Description
🐛 Describe the bug
I left it out for implementation expediency. See https://github.com/pytorch/executorch/blob/440a3ac7800816898578d05cd2c1a76cbf787760/kernels/optimized/cpu/op_linear.cpp#L32 .
I believe all that needs to be done is to get the bias into the C matrix passed to GEMM and then set beta to 1.0 per https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms#Level_3 .
Versions
N/A
cc @larryliu0820 @manuelcandales
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.