Skip to content

Commit 59ff97e

Browse files
cccclaifacebook-github-bot
authored andcommitted
fix mismatch sub dtype
Differential Revision: D80312352
1 parent 4915f9a commit 59ff97e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

exir/passes/remove_mixed_type_operators.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def call_operator(self, op, args, kwargs, meta: NodeMetadata): # noqa: C901
2323
promotion_type_allow_list = {
2424
torch.ops.aten.add.Tensor: ELEMENTWISE_TYPE_PROMOTION_KIND.DEFAULT,
2525
torch.ops.aten.mul.Tensor: ELEMENTWISE_TYPE_PROMOTION_KIND.DEFAULT,
26+
torch.ops.aten.sub.Tensor: ELEMENTWISE_TYPE_PROMOTION_KIND.DEFAULT,
2627
# The correct promotion for div depends on the mode! If there is no mode,
2728
# it's INT_TO_FLOAT, otherwise it's default.
2829
torch.ops.aten.div.Tensor: ELEMENTWISE_TYPE_PROMOTION_KIND.INT_TO_FLOAT,

0 commit comments

Comments
 (0)