HomePhabricator

[mlir] support creating memref descriptors from static shape with non-zero…

Authored by gysit on Wed, Feb 12, 1:36 PM.

Description

[mlir] support creating memref descriptors from static shape with non-zero offset

This patch adapts the method MemRefDescriptor::fromStaticShape to
support static non-zero offsets. The updated method uses the
getStridesAndOffset method to extract strides and offset. The patch also
adapts the test cases since sizes and strides are now set in forward
instead of reverse order.

Differential Revision: https://reviews.llvm.org/D74474