Refactor binary op partitioner configs under binary op config class
@csc010228 is already working on this.
Since Mar 25, 2025.
- Dominant language
- Python
- Stars
- 5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 581
Description
Problem
A lot of duplicated code is done for our partitioner configs which take in two inputs (mul, add, sub, etc.) I believe we can refactor these configs:
https://github.com/pytorch/executorch/blob/1a9a59b94491f03620dce622fee922c1d2bc1fa7/backends/xnnpack/partition/config/generic_node_configs.py#L100-L107
so that they all inherit from a parent BinaryConfig class. We can then enforce common constraints for these binary configs. This is similar to what we do with the GEMM Config:
Verification
Make sure all existing CI is passing. python -m unittest executorch.backends.xnnpack.test
Resources
cc @digantdesai @cbilgin
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.