[llvm] [mlir] [mlir][mesh] Add all-scatter operation (PR #81218)
Boian Petkantchin via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 13 14:29:54 PST 2024
================
@@ -309,6 +311,11 @@ DivModValue getDivMod(OpBuilder &b, Location loc, Value lhs, Value rhs);
FailureOr<SmallVector<Value>> delinearizeIndex(OpBuilder &b, Location loc,
Value linearIndex,
ArrayRef<Value> basis);
+// Generate IR that extracts the linear index form a multi-index according to
+// a shape.
+OpFoldResult linearIndexFromShape(ArrayRef<OpFoldResult> multiIndex,
----------------
sogartar wrote:
I renamed it. `delinearizeIndex` above it is uses shape/basis as well. I changed the argument to basis for consistency.
There is another function `computeLinearIndex` in indexing utils that uses stride instead of basis.
https://github.com/llvm/llvm-project/pull/81218
More information about the llvm-commits
mailing list