-
Notifications
You must be signed in to change notification settings - Fork 59
Closed
Description
This operator reverses the order of the input tensor along specified axes. There are some pytorch models using flip operator. When they target WebNN, the flip/reverse operator get fallback to other execution providers and cause performance drop.
Frameworks' support
Native ML API's support
- DML DML_SLICE1_OPERATOR_DESC supports reverse slicing by setting step to -1
- CoreML tensor_transformation.reverse
- TFLite tfl.reverse_v2
Proposal
dictionary MLReverseOptions : MLOperatorOptions {
sequence<[EnforceRange] unsigned long> axes;
};
MLOperand reverse(MLOperand input, optional MLReverseOptions options = {});Discussed with @fdwr offline, Dwayne recommended treating the axes similar to reduce operators. So if not provided at all, then all axes are reversed; but if explicitly passed as empty, then no axes are reversed.
Reactions are currently unavailable