Description
Problem
Currently there is no check that the XnnpackPartitioner does not partition mixed dtype ops for example a multiply that takes in a bf16 and fp32 input (these are not supported by xnnpack).
Context
In the XnnpackPartitioner we have configs for operators that describe how operators should be partitioned, and what constraints they must pass. The below link should show constraints that must be passed by all operators
We should add a check in this constraint to fail partitions that take in mixed dtypes as inputs. The refactoring done in this issue might be a good way to help enforce this more easily for binary inputs. #9024
Verification/Testing
Add a test with a pytorch module for operations that take in different dtypes (fp32, bf16, fp16, int8). Check that these are not partitioned:
Inverse of this:
executorch/backends/arm/test/ops/test_cat.py
Lines 69 to 70 in 1a9a59b
in that we want to check that there are no call_delegate nodes and the original node is still in the graph
Test for the following representative ops:
- cat
- mul
- add
- div
- sub
Resources
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status