executorch
executorch copied to clipboard
Why is `torch.min` not ATen canonical?
Hi team,
In the code below (found in exir/verification/verifier.py:81
)
def check_valid_op(self, op):
if isinstance(op, OpOverload):
# TODO These special ops should be removable easily.
if op.namespace in (
"quantized_decomposed",
"boltnn_nimble",
"nimble",
"quantized",
) or op in (
torch.ops.aten.mkldnn_rnn_layer.default,
torch.ops.aten._upsample_bilinear2d_aa.default,
torch.ops.aten.quantize_per_tensor.default,
torch.ops.aten.dequantize.self,
torch.ops.aten.max.default,
torch.ops.aten.full_like.default, # TODO(T183507359)`
Why is torch.ops.aten.max.default
ATen Canonical, but torch.ops.aten.min.default
isn't?
This is executorch==0.2.0
.
Thank you.
cc @manuelcandales @SS-JIA
Thanks for catching this. I have added torch.ops.aten.min.default
to that list. Notice that min/max are not considered Core ATen ops. They should be decomposed into amin/amax and argmin/argmax. Checkout this post for more details on the Core ATen Opset: https://dev-discuss.pytorch.org/t/defining-the-core-aten-opset/1464#operators-for-which-decompositions-will-be-added-to-the-core-aten-decomposition-table-6
Thanks @manuelcandales!