Files
clang-p2996/mlir/lib/Dialect/GPU/Transforms/DecomposeMemrefs.cpp
Ivan Butygin 793ee2bf08 [mlir][gpu] Add DecomposeMemrefsPass
Some GPU backends (SPIR-V) lower memrefs to bare pointers, so for dynamically sized/strided memrefs it will fail.
This pass extracts sizes and strides via `memref.extract_strrided_metadata` outside `gpu.launch` body and do index/offset calculation explicitly and then reconstructs memrefs via `memref.reinterpret_cast`.

`memref.reinterpret_cast` then lowered via https://reviews.llvm.org/D155011

Differential Revision: https://reviews.llvm.org/D155247
2023-08-10 22:28:05 +02:00

8.0 KiB