Prevent vectoristation of N-D tensor.extract when one of the indices
is calculated based on another tensor.extract Op from same
linalg.generic Op.
The test case is based on https://github.com/openxla/iree/issues/13036.
Paths
| Differential D148265
[mlir][linalg] Refine `tensor.extract` vectorisation AbandonedPublic Authored by awarzynski on Apr 13 2023, 12:54 PM.
Details
Summary Prevent vectoristation of N-D tensor.extract when one of the indices The test case is based on https://github.com/openxla/iree/issues/13036.
Diff Detail
Event TimelineHerald added subscribers: • pcwang-thead, limo1996, stephenneuendorffer, nicolasvasilache. · View Herald Transcript
Revision Contents
Diff 513329 mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
mlir/test/Dialect/Linalg/vectorization.mlir
|
Not sure I follow this check/comment. we'd have to analyse its indices to be certain. it which sense? Isn't the code right after this one doing so? Perhaps you want to move this to isContiguousLoadIdx?
To be more specific, if an extract op is part of the address computation of any memory access, the access would be contiguous if the extract op is loop invariant/uniform to the vectorized dimensions. Otherwise, we would have an indirect access, (e.g., a[f(b[i])], where i` is the vectorized dimension), that should lead to a gather.