Open huningxin opened 1 month ago
Seems reasonable to me 👍
Discussed with @fdwr offline, the negative strides may have ambiguities due to starting index. A separate reverse
operator is proposed in #773. I'd update the proposal to support the positive strides as the starter.
I'd update the proposal to support the positive strides as the starter.
Alrighty. Yeah, I can draw a diagram later illustrating the ambiguities related to negative strides, but positive strides are very clear.
This is a separate issue of previous discussion https://github.com/webmachinelearning/webnn/issues/369#issuecomment-1487754271 focusing on steps/strides support (proposed by @fdwr, thanks!).
A stride of
slice
operator indicates how many elements to advance when copying within the input tensor along a dimension. It is widely supported. However, today's WebNNslice
operator only support stride 1. We observed there are real models usingslice
with stride > 1. When targeting those model to WebNN, theslice
op has fallback to other execution provider and causes performance drop.Frameworks' support
strides
.steps
.start:stop:step
notion.Native ML API's support
InputWindowStrides
.stride
.strides
.Proposal
Revision History: 10/29/2004: only support positive strides.