[Mlir-commits] [mlir] [MLIR][Mesh] Add sharding propagation pass (PR #69665)
Boian Petkantchin
llvmlistbot at llvm.org
Mon Oct 23 15:05:39 PDT 2023
================
@@ -259,6 +259,19 @@ SmallVector<int64_t> mlir::getI64SubArray(ArrayAttr arrayAttr,
return res;
}
+SmallVector<SmallVector<int32_t>>
+mlir::getArrayOfI32Array(ArrayAttr arrayAttr) {
+ SmallVector<SmallVector<int32_t>> arrayOfI32Array;
+ for (auto attr : arrayAttr) {
+ arrayOfI32Array.push_back(llvm::to_vector(
+ llvm::map_range(llvm::cast<ArrayAttr>(attr), [&](Attribute intAttr) {
----------------
sogartar wrote:
As @joker-eph suggested you can use `llvm::map_to_vector` here.
https://github.com/llvm/llvm-project/pull/69665
More information about the Mlir-commits
mailing list