[BACKEND] Add generic support of convert_layout from distributed to shared (#1025)

This commit is contained in:
goostavz
2022-12-31 03:29:58 +08:00
committed by GitHub
parent 194ba103b1
commit 0e8590f1c9
5 changed files with 68 additions and 110 deletions

View File

@@ -254,6 +254,11 @@ SmallVector<unsigned> getOrder(const Attribute &layout) {
}
};
bool isaDistributedLayout(const Attribute &layout) {
return layout.isa<BlockedEncodingAttr>() || layout.isa<MmaEncodingAttr>() ||
layout.isa<SliceEncodingAttr>();
}
} // namespace gpu
} // namespace triton
} // namespace mlir