executorch
executorch copied to clipboard
Refactor binary op partitioner configs under binary op config class
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:
https://github.com/pytorch/executorch/blob/1a9a59b94491f03620dce622fee922c1d2bc1fa7/backends/xnnpack/partition/config/gemm_configs.py#L48
Verification
Make sure all existing CI is passing. python -m unittest executorch.backends.xnnpack.test
Resources
https://discord.gg/a9r5KZDNfZ
cc @digantdesai @cbilgin
Can I take on this issue?
@AlexFierro9 feel free to assign it to yourself and tag me here if you have any questions
@mcr229 Hi, I want to try to take on this issue, but it seems like I don't have the permission to assign it to myself. Could you please give me some help please. Thanks
Done!
Thank you very much! I am working on it
Hi @csc010228, thanks for picking up the task! Checking in, do you need any help on the issue? Feel free to ask here or on the discord.
@csc010228 what is the status on the issue?
@lucylq Hi, I am still reading the project's code and understanding its logic, and I have joined the discord channel.
Hello @csc010228, just wanted to check in on the progress of this issue. Thanks in advance!