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

Tobias Gysi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 03:10:23 PST 2020


gysit created this revision.
gysit added a reviewer: ftynse.
Herald added subscribers: llvm-commits, Joonsoo, liufengdb, aartbik, herhut, lucyrfox, mgester, arpith-jacob, csigg, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar, rriddle, mehdi_amini, jholewinski.
Herald added a reviewer: mravishankar.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74474

Files:
  mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
  mlir/test/Conversion/GPUToNVVM/memory-attrbution.mlir
  mlir/test/Conversion/StandardToLLVM/convert-static-memref-ops.mlir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74474.244114.patch
Type: text/x-patch
Size: 7210 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200212/ee5b32a9/attachment.bin>


More information about the llvm-commits mailing list